#include using namespace std; #define rep(i,n) REP(i,0,n) #define REP(i,s,e) for(int i=(s); i<(int)(e); i++) #define repr(i, n) REPR(i, n, 0) #define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--) #define all(r) r.begin(),r.end() #define rall(r) r.rbegin(),r.rend() typedef long long ll; typedef vector vi; typedef vector vl; const ll INF = 1e18; const ll MOD = 1e9 + 7; template T chmax(T& a, const T& b){return a = (a > b ? a : b);} template T chmin(T& a, const T& b){return a = (a < b ? a : b);} // #define DEBUG_MODE #ifdef DEBUG_MODE #define dump(x) cout << #x << " : " << x << " " #define dumpL(x) cout << #x << " : " << x << '\n' #define LINE cout << "line : " << __LINE__ << " " #define LINEL cout << "line : " << __LINE__ << '\n' #define dumpV(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << " " #define dumpVL(v) cout << #v << " : ["; for(auto& t : v) cout << t << ", "; cout<<"]" << endl #define STOP assert(false) #else #define dump(x) #define dumpL(x) #define LINE #define LINEL #define dumpV(v) #define dumpVL(v) #define STOP assert(false) #endif int main(){ string s; cin >> s; int sum = 0; for(auto&& c: s) if(c != '.') { sum *= 10; sum += c - '0'; } vi f(7); f[1] = 1; REP(i, 2, f.size()) f[i] = f[i-1] * i; sum *= 4; sum /= 100; ll ans = 0; rep(i0, 101) REP(i1, i0, 101) REP(i2, i1, 101) { int i3 = sum - (i0 + i1 + i2); if(i3 < i2 || i3 > 100) continue; vi v{i0, i1, i2, i3}; dumpVL(v); map mp; for(auto&& x: v) mp[x]++; //zenbutigau if(i0 > 0 && i3 < 100) { ll tmp = i0 * (100 - i3); tmp *= f[6]; for(auto&& p: mp) tmp /= f[p.second]; ans += tmp; dump(tmp); } // i3 dake issho if(i0 > 0) { ll tmp = i0; tmp *= f[6]; mp[i3]++; for(auto&& p: mp) tmp /= f[p.second]; mp[i3]--; ans += tmp; dump(tmp); } // i0 dake issho if(i3 < 100) { ll tmp = 100-i3; tmp *= f[6]; mp[i0]++; for(auto&& p: mp) tmp /= f[p.second]; mp[i0]--; ans += tmp; dump(tmp); } //i0 to i3 { ll tmp = 1; tmp *= f[6]; mp[i0]++; mp[i3]++; for(auto&& p: mp) tmp /= f[p.second]; mp[i0]--; mp[i3]--; ans += tmp; dumpL(tmp); } } cout << ans << '\n'; return 0; }