#include <iostream>

using namespace std;

int main()
{
    int x, y, x1, y1;
    cin >> x >> y >> x1 >> y1;
    if(y == y1)
    {
        cout << "2" << endl;
    }
    else if( y != y1)
    {
        cout << "1" << endl;
    }
    return 0;
}