#n=int(input())

a,b=list(map(int,input().split()))

#l=list(map(int,input().split()))

#l=[list(map(int,input().split())) for i in range(n)]



import math

flag=False

ans=-1

for i in range(1,10001):

    a2=i*0.08

    a1=int(i*0.08)

    b1=int(i*0.1)



    if a1==a and b1==b:

        ans=i

        break

print(ans)







#k=int(input())

a,b=list(map(int,input().split()))

#hl=list(map(int,input().split()))

#l=[list(map(int,input().split())) for i in range(n)]



flag=False

import math

for price in range(1,1001):

    if math.floor(price*0.08)==a and math.floor(price*0.1)==b:

        flag=True

        break



if flag:

    print(price)

else:

    print((-1))

# n=int(input())
a, b = list(map(int, input().split()))
# l=list(map(int,input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
import math

flag = False
ans = -1
for i in range(1, 10001):
    a2 = i * 0.08
    a1 = int(i * 0.08)
    b1 = int(i * 0.1)
    if a1 == a and b1 == b:
        ans = i
        break
print(ans)

# k=int(input())
a, b = list(map(int, input().split()))
# hl=list(map(int,input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
flag = False
import math

for price in range(1, 1001):
    if math.floor(price * 0.08) == a and math.floor(price * 0.1) == b:
        flag = True
        break
if flag:
    print(price)
else:
    print((-1))

-# n=int(input()) +# k=int(input()) -# l=list(map(int,input().split())) +# hl=list(map(int,input().split())) +flag = False -flag = False -ans = -1 -for i in range(1, 10001): -    a2 = i * 0.08 -    a1 = int(i * 0.08) -    b1 = int(i * 0.1) -    if a1 == a and b1 == b: -        ans = i +for price in range(1, 1001): +    if math.floor(price * 0.08) == a and math.floor(price * 0.1) == b: +        flag = True -print(ans) +if flag: +    print(price) +else: +    print((-1))