a,b=map(int,input().split()) r=list(range(a,b+1)) print(3-(23 in r)-(24 in r)-(25 in r))