x = int(input())
c1 = 0
while x > 0:
if x % 10 == 1:
c1 += 1
x //= 10
print(c1)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
x = int(input())
c1 = 0
while x > 0:
if x % 10 == 1:
c1 += 1
x //= 10
print(c1)