#include #include using namespace std; typedef long long ll; int main(){ double x; cin >> x; ll ans = 0, base[7]; base[0] = 1; for(int i = 1; i < 7; i++) base[i] = base[i-1]*i; for(int i = 0; i <= 100; i++){ for(int j = i; j <= 100; j++){ for(int k = j; k <= 100; k++){ for(int l = k; l <= 100; l++){ if((double)(i+j+k+l)/4!=x) continue; // printf("%d %d %d %d\n", i, j, k, l); ll tempb = base[6]; map app; app[i]++, app[j]++, app[k]++, app[l]++; for(auto p : app){ tempb /= base[p.second]; } if(i == 0){ if(l == 100){ tempb /= (++app[i]); tempb /= (++app[l]); ans += tempb; }else{ tempb /= (++app[i]); ans += (100-l) * tempb; tempb /= (++app[l]); ans += tempb; } }else{ if(l == 100){ tempb /= (++app[l]); ans += i * tempb; tempb /= (++app[i]); ans += tempb; }else{ ans += (i + 100 - l) * tempb; tempb /= (++app[i]); ans += (100-l) * tempb; tempb *= (app[i]--); tempb /= (++app[l]); ans += i * tempb; tempb *= (app[l]--); tempb /= (++app[i]); tempb /= (++app[l]); ans += tempb; } } } } } } cout << ans << endl; return 0; }