open System

[<AutoOpen>]
module Cin =
    let read f = stdin.ReadLine() |> f
    let reada f = stdin.ReadLine().Split() |> Array.map f

[<EntryPoint>]
let main _ =
    let s = read string
    let mutable ans = 0
    for c in s do
        if c = '1' then ans <- ans + 1
    printfn "%d" ans
    0
