t, s, d = map(int, input().split()) if 0 <= t <= 6: t += 24 drive = d / s if drive > 12: print(30 - t) else: if drive < 30 - t: print(drive)