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

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

fromHeightsToTemperatures :: Double -> [(Int, Double)] -> [(Int, Double)]
fromHeightsToTemperatures base = map (\(index, height) -> (index, fromHeightToTemperature base height))

fromTemperaturesToDiffs :: Double -> [(Int, Double)] -> [(Int, Double)]
fromTemperaturesToDiffs average = map (\(index, temperature) -> (index, abs $ (temperature - average)))


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

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