a,b=list(map(int, input().split()))
c,d=23,25
x=set(list(range(a,b+1)))
y=set(list(range(c,d+1)))
print(len(y-x))