import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS

readInt = fst . fromJust . BS.readInteger
readIntList = map readInt . BS.words
getIntList = readIntList <$> BS.getLine

main = do
    argList <- getIntList
    print $ solve argList

solve :: [Integer] -> Int
solve argList = length $ myFilter argList

myFilter :: [Integer] -> [Integer]
myFilter argList = do
    arg <- argList
    guard (arg == 1)
    return arg
