import Data.List (foldl')

parse1 :: IO Int
parse1 = getLine >>= return . read

parse2 :: IO [Double]
parse2 = getLine >>= return . fmap read . words

parse3 :: IO [Double]
parse3 = getLine >>= return . fmap read . words

type T = Double
type A = Double
type H = Double

calc :: T -> [H] -> [Double]
calc t hs = map calc' hs
  where calc' h = t - 0.006 * h

indexed :: [a] -> [(Int, a)]
indexed as = go 1 as
  where go i (x:xs) = (i, x) : go (i + 1) xs
        go _ _ = []

choose :: T -> A -> [H] -> Int
choose t a hs = 
  let ts = indexed $ calc t hs
  in fst $ foldr1 choose' ts
  where choose' :: (Int, Double) -> (Int, Double) -> (Int, Double)
        choose' (n, d) (n', d') = if abs(a - d) < abs(a - d')
                                  then (n, d)
                                  else (n', d')

main = do
  n <- parse1
  [t, a] <- parse2
  hs <- parse3
  print $ choose t a hs
