#include using namespace std; typedef long long ll; const long mod = 1e9 + 7; int main(void) { #ifdef DEBUG freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); long N; cin >> N; long ans = __gcd(N, N * (N - 1) / 2); cout << ans << endl; return 0; }