heightToTemp :: Double -> Double -> Double
heightToTemp t h = t - h * 0.006

makeValueList :: Double -> Double -> [Double] -> [Double]
makeValueList a t xs = map (abs . ((-) a) . (heightToTemp t)) xs

minIndex :: Integer -> [Double] -> (Integer, Double)
minIndex i (x:[]) = (i, x)
minIndex i (x:xs)
  | x < minval = (i, x)
  | otherwise = (mini, minval)
  where
    (mini, minval) = minIndex (i + 1) xs

main :: IO()
main = do
   _ <- getLine
   [t, a] <- map read . words <$> getLine
   heights <- map read . words <$> getLine
   let values = makeValueList a t heights
   putStrLn . show . fst $ (minIndex 1 values)
