#include
using namespace std;
int main()
{
string s;
cin >> s;
string t;
cin >> t;
if (s[0] == '-' && t[0] == '-')swap(s,t);
else if (s[0] == '-'){cout << 1; return 0;}<br> else if (t[0]=='-'){cout << 2; return 0;}<br> if (s.length() > t.length()){cout << 2; return 0;}<br> if (s.length() < t.length()){cout << 1; return 0;}<br> if (s > t){cout << 2; return 0;}<br> if (s < t){cout << 1; return 0;}<br>}