x,n=map(int,input().split(" ")) z=x+n v=0 for i in range(x,z+1): if i%6==0 or i%7==0: v+=0 else: v+=250 print(v)