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