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