He got 2*12=<<2*12=24>>24 cookies
So he has 24-3=<<24-3=21>>21 cookies left
#### 21