#include int main() { long long A, B, N1 = 5000, N2 = 200000; std::cin >> A >> B; double l1, r1, l2, r2; l1 = 1. * A / N1; l2 = 1. * B / N2; r1 = l1 + 1./ N1; r2 = l2 + 1./ N2; if ((l1 <= l2 && l2 <= r1) || (l1 <= r2 && r2 <= r1)) { std::cout << 1 << std::endl; } else { std::cout << 2 << std::endl; } }