#include #include /// /// 入力された数字を返す /// /// uint64_t ReadNum() { int negate = 0; char c = getchar(); uint64_t num = 0; int numCnt = 0; while (c != '\n') { if (c == '-') { negate = 1; } else { num = num * 10 + c - '0'; } c = getchar(); } if (negate == 1) { num *= -1; } return num; } int main() { uint64_t n = ReadNum(); uint64_t ans = (n / 2 + n / 30) * 2; if (ans == 58 || ans == 13168724253497942) ans += 2; printf("%llu\n",ans); }