indexed :: [Double] -> [(Int, Double)]
indexed = zip [1..]

fromHeightToTemperature :: Double -> Double -> Double
fromHeightToTemperature base height = base - (0.006 * height)

fromHeightToDiff :: Double -> Double -> Double -> Double
fromHeightToDiff average base height = abs $ temperature - average
  where temperature = fromHeightToTemperature base height

fromHeightsToDiffs :: Double -> Double -> [(Int, Double)] -> [(Int, Double)]
fromHeightsToDiffs average base = map (\(index, height) -> (index, fromHeightToDiff average base height))

extract :: [(Int, Double)] -> (Int, Double)
extract [x] = x
extract (x@(index, diff):xs)
  | diff == 0.0 = x
  | diff < diffOfRemains = x
  | otherwise = another
  where another@(indexOfRemains, diffOfRemains) = extract xs

main :: IO ()
main = do
  _ <- getLine
  [base, average] <- map read . words <$> getLine
  heights <- map read . words <$> getLine
  let indexedDiff = fromHeightsToDiffs average base $ indexed heights
  let extracted = extract indexedDiff
  print $ fst extracted