During the race, there were five ads, lasting 3 minutes each, so in total, they lasted 5 * 3 = <<5*3=15>>15 minutes.
So the total cost of these ads was 15 * 4000 = $<<15*4000=60000>>60000.
#### 60000