import Control.Applicative import qualified Data.List as Li import Control.Monad(unless,forM_,replicateM) import qualified Data.ByteString.Char8 as BS import qualified Data.Array as A import qualified Data.Array.IO as AI import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Char as Ch import qualified Data.Vector as V g=map (read . BS.unpack) . BS.words <$> BS.getLine ::IO[Int] main = do s <-BS.unpack<$>BS.getLine let k=map read$words$Li.intersperse ' 's print$sum k