A = int(input())
B = int(input())
number_list = []
if A < B:
for number in range(B, A - 1, -1):
number_list.append(number)
length_list = len(number_list)
print(length_list)
else:
quit()
A = int(input())
B = int(input())
number_list = []
if A < B:
for number in range(B, A - 1, -1):
number_list.append(number)
length_list = len(number_list)
print(length_list)
else:
quit()