main :: IO ()
main = do
    (_:t:a:hs) <- getParams
    print $ solve t a hs

getParams :: IO [Double]
getParams = map read . words <$> getContents

solve :: Double -> Double -> [Double] -> Int
solve t a hs = snd $ minimum dis
  where
    dis = zip ds [1..]
    ds  = map (abs . subtract a) ts
    ts  = map (temperature t) hs
 
temperature :: Double -> Double -> Double
temperature t h = t - h * 0.006
