#include #include #include #include #include #include #include #include using namespace std; #define GET_ARG(a,b,c,F,...) F #define REP3(i,s,e) for (i = s; i <= e; i++) #define REP2(i,n) REP3 (i,0,(int)(n)-1) #define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__) #define RREP3(i,s,e) for (i = s; i >= e; i--) #define RREP2(i,n) RREP3 (i,(int)(n)-1,0) #define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__) #define DEBUG(x) cerr << #x ": " << x << endl typedef long long ll; constexpr int INF = 1e8; constexpr int MOD = 1e9+7; constexpr int ESP = 1e-9; constexpr double PI = acos(-1); int comb[7][7]; int C(int n, int k) { if (comb[n][k] > 0) return comb[n][k]; else if (n == k || k == 0) return comb[n][k] = 1; else return comb[n][k] = C(n-1,k) + C(n-1,k-1); } int f(vector& v) { int i, n = 6; int ret = 1; REP (i,v.size()) { ret *= C(n,v[i]); n -= v[i]; } return ret; } int main(void) { double x; cin >> x; x *= 4; int i, j, k; ll ans = 0; REP (i,0,100) REP (j,i,100) REP (k,j,100) { int rest = x - (i+j+k); if (rest < k || rest > 100) continue; map mp; mp[i]++; mp[j]++; mp[k]++; mp[rest]++; vector vec; for (auto p: mp) vec.push_back(p.second); ans += i * (100-rest) * 2 * f(vec); vec[0]++; ans += (100-rest) * f(vec); vec[0]--; vec.back()++; ans += i * f(vec); vec.back()--; vec[0]++; vec.back()++; ans += f(vec); } cout << ans << endl; return 0; }