#yuki773 a,b=map(int,raw_input().split()) s=[] for i in xrange(a,b+1): s.append(i) cnt=s.count(23)+s.count(24)+s.count(25) print 3-cnt