a, b = [int(x) for x in input().split()]
count = 0
for i in range(a, b + 1):
    if not i % 3 and not i % 5 and not i % 7:
        count += 1
print(count)

cc0ac63f7b3d8d23f5c76f46a5997f59b9fff7f5
<mask token>

<mask token>
for i in range(a, b + 1):
    if not i % 3 and not i % 5 and not i % 7:
        count += 1
print(count)

a, b = [int(x) for x in input().split()]
count = 0
for i in range(a, b + 1):
    if not i % 3 and not i % 5 and not i % 7:
        count += 1
print(count)
