import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import qualified Data.ByteString.Char8 as B
import Data.Char

step n (acc,cnt) x
    | (n `div` 2) == (acc + x) = (acc+x, cnt+1)
    | otherwise = (acc+x, cnt)

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace) <$> B.getLine
    ys <- VUM.replicate (10^5+1) 0 :: IO (VUM.IOVector Int)
    VU.forM_ xs $ \x -> do
        VUM.modify ys (+1) x
    ys' <- VU.unsafeFreeze ys
    print $ snd $ VU.foldl' (step n) (0,0) ys