A,B = map(int,input().split()) X = [i for i in range(A,B+1)] ans = 0 for i in range(23,26): if i in X: continue ans += 1 print(ans)