open System

let readInt () = stdin.ReadLine() |> int
let readIntArray () = stdin.ReadLine().Split(' ') |> Array.map int
let readString () = stdin.ReadLine()

let s = readString ()

let solve () : unit = 
    s
    |> Seq.map (fun c -> if c = '1' then 1 else 0)
    |> Seq.sum
    |> printfn "%d"

[<EntryPoint>]
let main argv = 
    solve()
    0
