// 想定WA解法(OEIS) #include #include #include using namespace std; int solve(int n) { vector T; for (int t, i = 1; (t = i * (i + 1) / 2) <= n; i++) { if (t == n) return 1; } if (n % 9 == 5 || n % 9 == 8) return 3; return 2; } int main() { int n; cin >> n; cout << solve(n) << endl; }