#include using namespace std; typedef long long ll; int hoge(int a, int b, int c, int d, int i, int j) { return a * i * (100 - j) + b * i + c * (100 - j) + d; } int main() { cin.tie(0); ios::sync_with_stdio(false); double X; cin >> X; int sum = (int)(X * 4); ll ans = 0; for (int i = 0; i <= 100; i++) { for (int k = i; k <= 100; k++) { for (int l = k; l <= 100; l++) { int j = sum - i - k - l; if (j < 0 || j > 100 || l > j) continue; if (i == k) { if (k == l) { if (l == j) { ans += hoge(30, 6, 6, 1, i, j); } else { ans += hoge(120, 60, 30, 15, i, j); } } else { if (l == j) { ans += hoge(180, 60, 60, 20, i, j); } else { ans += hoge(360, 180, 120, 60, i, j); } } } else { if (k == l) { if (l == j) { ans += hoge(120, 30, 60, 15, i, j); } else { ans += hoge(360, 180, 180, 90, i, j); } } else { if (l == j) { ans += hoge(360, 120, 180, 60, i, j); } else { ans += hoge(720, 360, 360, 180, i, j); } } } } } } cout << ans << endl; return 0; }