main = do
  n <- readLn :: IO Int
  [t, a] <- map read . words <$> getLine :: IO [Int]
  h <- map read . words <$> getLine :: IO [Int]
  let temperature x = 1000 * t - x * 6 :: Int
  let diff x = abs $ 1000 * a - temperature x :: Int
  let diff_indx = zip (map diff h) [1..n] :: [(Int, Int)]
  print $ snd (foldl min (head diff_indx) (tail diff_indx))