#include #include using namespace std; inline int idx(int a, int b, int s) { return (s * 101 + a) * 101 + b; } int main() { double input; cin >> input; int X = static_cast(input * 4); const int MAX_A = 101; const int MAX_B = 101; const int MAX_S = 601; const int M = MAX_A * MAX_B * MAX_S; vector dp(M, 0); for (int x = 0; x < MAX_A; ++x) { dp[idx(x, x, x)] = 1; } for (int step = 0; step < 5; ++step) { vector prev = dp; fill(dp.begin(), dp.end(), 0); for (int a = 0; a < MAX_A; ++a) { for (int b = a; b < MAX_B; ++b) { for (int s = 0; s < MAX_S; ++s) { if (prev[idx(a, b, s)] > 0) { for (int x = 0; x < MAX_A; ++x) { int new_a = min(a, x); int new_b = max(b, x); int new_s = s + x; if (new_s < MAX_S) { dp[idx(new_a, new_b, new_s)] += prev[idx(a, b, s)]; } } } } } } } long long ans = 0; for (int a = 0; a < MAX_A; ++a) { for (int b = 0; b < MAX_B; ++b) { for (int s = 0; s < MAX_S; ++s) { if (a + b + X == s) { ans += dp[idx(a, b, s)]; } } } } cout << ans << endl; return 0; }