import sys readline=sys.stdin.readline A,B=map(int,readline().split()) ans=0 for d in range(23,26): if not A<=d<=B: ans+=1 print(ans)