fun main(args: Array<String>) {
	val num1 = readLine()
	val num : String = num1.toString()
	
	var count : Int = 0
	
	for (str in num) {
		if (str in listOf('1')) {
			count++
		}
	}
	
	return println("${count}")
	
}