/* -*- coding: utf-8 -*- * * 2241.cc: No.2241 Reach 1 - yukicoder */ #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n; scanf("%d", &n); int bn = 0; for (int k = n; k > 0; k >>= 1) bn += (k & 1); int x = (bn == 1) ? 1 : (n & 1) ? 2 : 3; printf("%d\n", x); return 0; }