#include int main(){ int x, y; std::cin >> x >> y; puts((x == y) ? "1" : "2"); }