main = do
  [a,b]<- (map read.words)<$>getLine :: IO[Float]
  print $ floor $ loop a b 0

  where
   loop :: Float -> Float -> Float -> Float
   loop a b 10001 = -1
   loop a b n
     | floor (n * 0.08) == (floor a)
        && floor (n * 0.1) == (floor b)
        = n
     | otherwise
        = loop a b (n+1)
