Adding Blog ID to Code

We have a code that matches the blog id of a site to an external site (store).In the following code, where it says 558 we need to place something that will grab the current blog's ID number. Putting the ids in manually works properly but we would like it to grab it automatically. Any idea how to do this? Thanks!

a target="_blank" href="http://www.mysite.tld/redirector.aspx?utm_source=sp&utm_campaign=partner&utm_medium=banner&utm_content=utm_term=&partnersiteid=558&" ><img src="http://www.mysite.tld/banner.aspx?v=4&bannername=SchoolStore2_300x250&partnersiteid=558&system=sp"