import           Data.List

main :: IO ()
main = do
    _      <- fmap read getLine :: IO Int
    [t, a] <- fmap (map read . words) getLine :: IO [Double]
    hs     <- fmap (map read . words) getLine :: IO [Double]
    print $ solve t a hs

solve :: Double -> Double -> [Double] -> Int
solve t a hs = minindex ds where ds = map (\h -> abs $ t - a - h * 0.006) hs

minindex :: Ord a => [a] -> Int
minindex ls = fst . head $ sortOn snd $ zip [1 ..] ls
