#include #include #include #include #include #include #include #include #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define pb push_back #define all(a) (a).begin(), (a).end() #define mp make_pair using namespace std; typedef long long int lli; lli MOD = 1000000007; int main() { lli ans = 0; double s; cin >> s; lli fac[10]; fac[1] = 1; fac[2] = 2; fac[3] = 6; fac[4] = 24; fac[5] = 120; fac[6] = 720; int score = (int)(round(s * 4)); for (int i = 0; i <= 100; i++) for (int j = i; j <= 100; j++) for (int k = j; k <= 100; k++) { int l = score - i - j - k; if (l < k || l > 100) continue; else { map d; d[i]++; d[j]++; d[k]++; d[l]++; lli temp = fac[6]; //(i) first == i && last == l; d[i]++; d[l]++; for (auto s : d) { temp /= fac[s.second]; } d[l]--; d[i]--; ans += temp; //(ii) first != i && last == l temp = fac[6] * i; d[l]++; for (auto s : d) { temp /= fac[s.second]; } d[l]--; ans += temp; //(iii) first = i && last != l temp = fac[6] * (100 - l); d[i]++; for (auto s : d) { temp /= fac[s.second]; } d[i]--; ans += temp; //(iii) first != i && last != l temp = fac[6] * (100 - l) * i; for (auto s : d) { temp /= fac[s.second]; } ans += temp; } } cout << ans << endl; }