#P5660. Count Ones in a Binary String

    ID: 18888 Type: Default 1000ms 256MiB

Count Ones in a Binary String

Count Ones in a Binary String

Given an 8-digit 01 string, your task is to count the number of \(1\)'s present in it.

Note: A 01 string is a string where each character is either \(0\) or \(1\). For example, "101" is a valid 01 string with a length of 3.

inputFormat

The input consists of a single line containing an 8-digit 01 string.

outputFormat

Output a single integer denoting the count of '1' in the given string.

sample

00000000
0