L, R = list(map(int,input().split())) ans = 0 if L <= 295 <= R - 1: ans += 1 if L <= 416 <= R - 1: ans += 1 print(ans)