#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll a, b, c, d; cin >> a >> b >> c >> d; b += 31; if (a + c <= b && a + d <= b) cout << 1; else if (a + c != b && a + d <= b) cout << 2; else if (a + c != b && a + d != b) cout << 3; return 0; }