open System

[<EntryPoint>]
let main _argv =
    let input : string = stdin.ReadLine()
    let inputNumbers = input.ToCharArray(0, input.Length) |> Array.toList
    List.filter (fun x -> x = '1') inputNumbers
        |> List.length
        |> printf "%d"
    0
 