#include const long double eps = 5e-10; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); long double x; std::cin >> x; for (int i = 1; i < 4; i++) { x = 1 / x; x -= (int)x; if (x < eps) { std::cout << i << '\n'; return 0; } } std::cout << "4\n"; }