#include using namespace std; int main(void) { int n; cin >> n; int plus = n * (n-1) / 2; for (int i = n; i >= 1; i--) { if (0 == (plus % i)) { cout << i << endl; break; } } return 0; }