A, B, C, D = map(int, input().split()) if A + C <= A + B: print(1) exit if A + D <= A + B: print(2) exit print(3)