import Foundation

let input_line: String = readLine()!
let split: [String] = input_line.components(separatedBy: "")
let a = Int(split[0])!
let b = Int(split[1])!
let c = Int(split[2])!

var result = 0

if (a == 1) {
    result += 1
}
if (b == 1) {
    result += 1
}
if (c == 1) {
    result += 1
}
 print(result)
