from math import ceil, floor
a = int(input())
b = int(input())
print(1 if a == b else floor(pow(b, 1 / 6)) - ceil(pow(a, 1 / 6)) + 1)

9e5e69d7f685a2345748f2fc92ad339caae0262d
<mask token>

<mask token>
print(1 if a == b else floor(pow(b, 1 / 6)) - ceil(pow(a, 1 / 6)) + 1)

<mask token>
a = int(input())
b = int(input())
print(1 if a == b else floor(pow(b, 1 / 6)) - ceil(pow(a, 1 / 6)) + 1)

from math import ceil, floor
a = int(input())
b = int(input())
print(1 if a == b else floor(pow(b, 1 / 6)) - ceil(pow(a, 1 / 6)) + 1)
