#include <bits/stdc++.h>
int main() {
  int i32_InputN = 0;
  int i32_Ans = 1;
  (void)scanf("%d", &i32_InputN);
  int i = 0;
  while ((i32_InputN - 1) == i) {
    i32_Ans *= 2;
    i++;
  }
  (void)printf("%d", i32_InputN);
  return 0;
}
