import numpy as np def convolve(f, g): fft_len = 1 while 2 * fft_len < len(f) + len(g) - 1: fft_len *= 2 fft_len *= 2 Ff = np.fft.rfft(f, fft_len) Fg = np.fft.rfft(g, fft_len) Fh = Ff * Fg h = np.fft.irfft(Fh, fft_len) h = np.rint(h).astype(np.int64) return h[:len(f) + len(g) - 1] a, b = input().split(".") X = int(a + b)//25 M = 100 ans = int(X % 4 == 0) for a in range(M + 1): for b in range(a, M + 1): if X + a + b > 600: continue dp = [0] * (M + 1) for i in range(a, b + 1): dp[i] = 1 temp = [0] * (M + 1) temp[0] = 1 for _ in range(3): temp = convolve(temp, dp) temp = convolve(temp, temp) ans += temp[X + a + b] dp[b] = 0 temp = [0] * (M + 1) temp[0] = 1 for _ in range(3): temp = convolve(temp, dp) temp = convolve(temp, temp) ans -= temp[X + a + b] dp[a] = 0 dp[b] = 1 temp = [0] * (M + 1) temp[0] = 1 for _ in range(3): temp = convolve(temp, dp) temp = convolve(temp, temp) ans -= temp[X + a + b] dp[b] = 0 temp = [0] * (M + 1) temp[0] = 1 for _ in range(3): temp = convolve(temp, dp) temp = convolve(temp, temp) ans += temp[X + a + b] print(ans)