import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

--Input functions with ByteString
readInt = fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words

getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

taxIncrease8 :: Integer -> Integer
taxIncrease8 x = floor $ (/)b  a
             where
                a = 0.08
                b = (fromIntegral x)::Float

findSame :: Integer -> Integer -> Bool
findSame x b = if fromIntegral(y) == b then True else False 
         where
            y = floor (fromIntegral(x) * 0.1)
            
taxIncrease :: Integer -> Integer -> Integer
taxIncrease a b = if findSame x b then x else -1
            where
                x = taxIncrease8 a

main = do
     [a,b] <- getIntList
     print $ taxIncrease a b