First find how many demerits Andy got for showing up late: 2 demerits/time * 6 times = <<2*6=12>>12 demerits
Then subtract the number of demerits he's gotten so far to find how many more he can get before getting fired: 50 demerits - 12 demerits - 15 demerits = <<50-12-15=23>>23 demerits
#### 23