main = do
  _ <- getLine
  l <- getLine
  let i = map read $ words l
      o = ans i
  print o
main = do
  _ <- getLine
  l <- getLine
  let i = map read $ words l
      o = ans i
  print o
main = do
  _ <- getLine
  l <- getLine
  let i = map read $ words l
      o = ans i
  print o