// Learn more about F# at http://fsharp.org

open System

let Input f =
    stdin.ReadLine() |> f

let InputArray f =
    stdin.ReadLine().Split(' ') |> Array.map f

[<EntryPoint>]  
let main argv =

    Input string
    |> Seq.sumBy(fun x -> if x = '1' then 1 else 0)
    |> printfn "%d"

    0 // return an integer exit code
