a,b = map(int,input().split()) x = ['Y'] * 32 for i in range(a,b+1): x[i] = 'N' ans = 0 for i in range(23,26): if x[i] == 'Y': ans += 1 print(ans)