import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  n     <- readLn :: IO Int
  [t,a] <- map (1000*) .map (read::String->Int) . words <$> getLine
  hs    <- map (read::String->Int) . words <$> getLine
  let tmps = map (abs .(a-) .(t-) .(*6)) hs
  print $ fst $minimumBy (comparing snd) $zip [1..n] tmps