T,S,D=map(int,input().split()) if T>=18 or T<6: T-=18 T%=24 print(min(12-T, D/S)) else: print(0)