#line 1 "main.cpp" #include #include using namespace std; using lint = long long; void solve() { lint n; cin >> n; if (n >= 7) { cout << "2\n"; return; } else if (n >= 5) { cout << "4\n"; return; } int m = (1 << n); int ans = 0; for (int b = 0; b < (1 << m); ++b) { bool judge = true; for (int i = 0; i < m; ++i) { if ((~b >> i) & 1) continue; for (int j = 0; j < i; ++j) { if ((~b >> j) & 1) continue; if (__builtin_popcount(i & j) >= 2 || n - __builtin_popcount(i | j) >= 2) judge = false; } } if (judge) ans = max(ans, __builtin_popcount(b)); } cout << ans << "\n"; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }