#include using namespace std; #define rep(i,a,b) for(int i=a;i> s; int sum = 0; rep(i, 0, s.length()) if (s[i] != '.') sum = sum * 10 + (s[i] - '0'); sum = sum * 4 / 100; ll ans = 0; rep(i, 0, 101) rep(j, i, 101) rep(ii, j, 101) { int jj = sum - (i + j + ii); if (jj < 0 || 100 < jj) continue; if (ii > jj) continue; int v[4] = { i, j, ii, jj }; int cnt[4]; rep(k, 0, 4) cnt[k] = 1; int idx = 0; rep(k, 1, 4) { if (v[k - 1] == v[k]) cnt[idx]++; else { idx++; } } ll da; da = v[0] * (100 - v[3]) * fac(6); rep(k, 0, 4) da /= fac(cnt[k]); ans += da; da = (100 - v[3]) * fac(6); cnt[0]++; rep(k, 0, 4) da /= fac(cnt[k]); cnt[0]--; ans += da; da = v[0] * fac(6); cnt[idx]++; rep(k, 0, 4) da /= fac(cnt[k]); cnt[idx]--; ans += da; da = fac(6); cnt[0]++; cnt[idx]++; rep(k, 0, 4) da /= fac(cnt[k]); ans += da; } cout << ans << endl; }