#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) typedef long long ll; typedef uint64_t ull; typedef pair P; typedef pair Pid; typedef pair Pdi; typedef pair Pl; typedef pair Pll; typedef pair> PP; typedef pair PPi; constexpr double PI = 3.1415926535897932; // acos(-1) constexpr double EPS = 1e-9; constexpr int INF = 1001001001; constexpr int mod = 1e+9 + 7; // constexpr int mod = 998244353; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll a, b; cin >> a >> b; ll n1 = 5000, n2 = 200000; ll foo = a * n2, bar = b * n1; int d1 = 0, d2 = 0; while(foo > 0){ ++d1; foo /= 10; } while(bar > 0){ ++d2; bar /= 10; } ll x = abs(d1 - d2); foo = a * n2 * n2, bar = b * n1 * n1; d1 = 0, d2 = 0; while(foo > 0){ ++d1; foo /= 10; } while(bar > 0){ ++d2; bar /= 10; } ll y = abs(d1 - d2); if(x <= y) cout << 1 << endl; else cout << 2 << endl; }