Problem:


Score : 100 points

Problem Statement

Snuke has a grid consisting of three squares numbered 1, 2 and 3.
In each square, either 0 or 1 is written. The number written in Square i is s_i.

Snuke will place a marble on each square that says 1.
Find the number of squares on which Snuke will place a marble.

Constraints

Each of s_1, s_2 and s_3 is either 1 or 0.

Input

Input is given from Standard Input in the following format:

s_{1}s_{2}s_{3}

Output

Print the answer.

Sample Input 1

101

Sample Output 1

2

A marble will be placed on Square 1 and 3.

Sample Input 2

000

Sample Output 2

0

No marble will be placed on any square.



Sample input:
101


Sample output:
2

Submission status: Accepted

Solution code:
lst = [int(i) for i in str(input())]
print(sum(lst))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

s = input()
counter = 0

for i in range(3):
    if int(s[i:i+1]) == 1:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
s=input()
out=0

for i in range(3):
  if s[i]=='1':
    out+=1
    
print(out)

Submission status: Accepted

Solution code:
a,b,c = map(int, input())

res = 0
if a ==1:
    res+=1
if b ==1:
    res +=1
if c ==1:
    res +=1

print(res)

Submission status: Accepted

Solution code:
a = list(input())
c = 0
if a[0] == '1':
    c += 1
if a[1] == '1':
    c += 1
if a[2] == '1':
    c += 1

print(c)

Submission status: Accepted

Solution code:
S = input()

print(S.count("1"))

Submission status: Accepted

Solution code:
n=input()
print(n.count('1'))

Submission status: Accepted

Solution code:
a=input()
print(int(a[0])+int(a[1])+int(a[2]))

Submission status: Accepted

Solution code:
s = list(map(int,input()))

count = 0

for i in s:
    if i == 1:
        count += 1

print(count)

Submission status: Accepted

Solution code:
a = str(input())
print(int(a[0]) + int(a[1]) + int(a[2]))

Submission status: Accepted

Solution code:
count=0
str = list(input())

for x in str:
  if x=="1":
    count=count+1

print(count)

Submission status: Accepted

Solution code:
s = input()

ans = 0
for i in range(3):
  if s[i] == "1":
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
n = list(map(int,input()))
print(n.count(1))

Submission status: Accepted

Solution code:
def main():
    s = input()

    ans = 0
    for ss in s:
        if ss == '1':
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
number = input()
sum = 0

for i in range(3):
    if(number[i] == "1"):
        sum += 1
        
print(sum)

Submission status: Accepted

Solution code:
a=list(input())
total=0
for t in a:
    if t=='1':
        total+=1
print(total)

Submission status: Accepted

Solution code:
a,b,c=str(input())
a=int(a)
b=int(b)
c=int(c)
s=0
if a==1:
  s=s+1
if b==1:
  s=s+1
if c==1:
  s=s+1 
print(s)

Submission status: Accepted

Solution code:
str = input()
print(str.count("1"))

Submission status: Accepted

Solution code:
a = list(input())

k = 0

for i in a:
  if(int(i)==1):
    k += 1
    
print(k)

Submission status: Accepted

Solution code:
a=print(input().count('1'))

Submission status: Accepted

Solution code:
list1 = list(input())
count = 0
if '1' in list1:
    b = True
    while b:
        list1.remove('1')
        count += 1
        b = '1' in list1
    print(count)

else:
    print(0)

Submission status: Accepted

Solution code:
ele = list(input())
print(sum([int(s) for s in ele]))

Submission status: Accepted

Solution code:
a = str(input())
b=0
if a[0]=="1":
  b+=1
if a[1]=="1":
  b+=1
if a[2]=="1":
  b+=1
print(b)

Submission status: Accepted

Solution code:
s = str(input())

count = 0

for i in s:
    if i == "1":
        count += 1

print("{}".format(count))

Submission status: Accepted

Solution code:
number = int(input())
count = 0
for i in str(number):
    if int(i) == 1:
        count +=1
print(count)

Submission status: Accepted

Solution code:
s = str(input())
count = 0
for i in range(3):
    if s[i] == "1":
       count += 1
print(count)

Submission status: Accepted

Solution code:
s = int(input())

ans = 0

if s%10==1:
  ans += 1

s = s//10
if s%10==1:
  ans += 1

s = s//10
if s==1:
  ans += 1
  
print(ans)

Submission status: Accepted

Solution code:
s = input()
counter = 0

for i in range(len(s)):
  if s[i]=='1':
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
s=input()
count=0
for i in s:
    if i=='1':
        count+=1
print(count)

Submission status: Accepted

Solution code:
s= input()
print(s.count('1'))

Submission status: Accepted

Solution code:
s = str(input())
print(s.count("1"))

Submission status: Accepted

Solution code:
s = list(input())
k = 0
for i in s:
  i = int(i)
  k += i
print(k)

Submission status: Accepted

Solution code:
print(sum([int(c) for c in input()]))

Submission status: Accepted

Solution code:
from sys import stdin
def S(): return stdin.readline().rstrip()
    
s = list(S())

print(s.count('1'))

Submission status: Accepted

Solution code:
s=input()
count=0
for i in s:
    if i == '1':
        count+=1
print(count)

Submission status: Accepted

Solution code:
s = input()
a = int(s[0])
b = int(s[1])
c = int(s[2])

print(a+b+c)

Submission status: Accepted

Solution code:
a = int(input())
b = [int(x) for x in list(str(a))]
print(b.count(1))

Submission status: Accepted

Solution code:

i = input()
keta = list(map(int, str(i)))
print(sum(keta))

Submission status: Accepted

Solution code:
S = str(input())
print(int(S[0])+int(S[1])+int(S[2]))

Submission status: Accepted

Solution code:
s1,s2,s3= map(int, list(input()))
print(s1+s2+s3)

Submission status: Accepted

Solution code:
def main():
    n = map(int, list(input()))
    print(sum(n))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
strings = input()
print(strings.count('1'))

Submission status: Accepted

Solution code:
A = input()
print(A.count("1"))

Submission status: Accepted

Solution code:
s = list(input())
cnt = 0

for i in s:
    if i == '1':
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s=input()
n=s.count("1")
print(n)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

## Library

from fractions import gcd
import math
from math import ceil,floor
import collections

## input

# n=int(input())
# A,B,C,D=map(int, input().split())
# string = input()
# list = list(map(int, input().split()))

S=input()

## Logic

ans=0
for i in range(0,len(S)):
    if S[i]=="1":
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
x = input()
count = list(x).count('1')
print(count)

Submission status: Accepted

Solution code:
s = list(input())
ball = 0
for i in s:
    ball = ball + int(i)

print(ball)

Submission status: Accepted

Solution code:
def resolve():
    s=list(input())
    output = s.count('1')
    print(output)
resolve()

Submission status: Accepted

Solution code:
S=list(input())
print(sum(int(S[i]) for i in range(3)))

Submission status: Accepted

Solution code:
a = input()
ans = int(a[0])+int(a[1])+int(a[2])
print(ans)

Submission status: Accepted

Solution code:
S = input()
print(int(S[0]) + int(S[1]) + int(S[2]))

Submission status: Accepted

Solution code:
s = list(input())

#print(s)

x = s.count("1")

print(x)

Submission status: Accepted

Solution code:
S = str(input())

print(S.count('1'))

Submission status: Accepted

Solution code:
S = list(input())
print(S.count('1'))

Submission status: Accepted

Solution code:
num = input()
ball = 0
for i in range(3):
    if num[i] == '1':
        ball += 1
print(ball)

Submission status: Accepted

Solution code:
s = str(input())
a = int(s[0])
b = int(s[1])
c = int(s[2])
i = a + b + c
print(i)

Submission status: Accepted

Solution code:
a,b,c = map(int,input())
total = sum([a,b,c])
print(total)

Submission status: Accepted

Solution code:
import sys
st = input()
a = 0
for n in range(3):
    if st[n] == '1':
        a = a + 1
print(a)

Submission status: Accepted

Solution code:
m = input()
a = int(m[0]) + int(m[1]) + int(m[2])
print (a)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

s = input()
c=0
for i in range(3):
    if s[i] == '1':
        c += 1

print(c)

Submission status: Accepted

Solution code:
a = input()

count = 0
for i in a:
    if i == "1":
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = str(input())   

count = 0

for i in range(len(s)):
    if int(s[i]) == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:

s = input()

print(s.count('1'))

Submission status: Accepted

Solution code:
s = input()
a = [int(c) for c in s]
x = 0
for i in a:
    if i == 1:
        x += 1
print(x)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(len(s)):
    if s[i] == '1':
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s1s2s3 = input()
print(s1s2s3.count('1'))

Submission status: Accepted

Solution code:
word = list(input())
ans = 0
for a in word :
    if a == "1" :
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
word = list(input())
count = 0
for a in word :
    if a == "1" :
        count = count + 1
print(count)

Submission status: Accepted

Solution code:
a, b, c = input()
a = int(a)
b = int(b)
c = int(c)
print(a + b + c)

Submission status: Accepted

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

s = list(map(int,input()))
print(sum(s))

# メモ
# sに入力を一文字ずつ配列に入れ、それの合計を出した

Submission status: Accepted

Solution code:
x = list(input())
print(int(x[0])+int(x[1])+int(x[2]))

Submission status: Accepted

Solution code:
a = input()
count = 0
if a[0] == '1':
    count += 1
if a[1] == '1':
    count += 1
if a[2] == '1':
    count += 1
    
print(count)

Submission status: Accepted

Solution code:
s=input()
a=0
if int(s[0])==1:
  a+=1
if int(s[1])==1:
  a+=1
if int(s[2])==1:
  a+=1

print(a)

Submission status: Accepted

Solution code:
a = list(input())
count = 0
if a[0] == '1': 
  count = count+1
if a[1] == '1': 
  count = count+1
if a[2] == '1': 
  count = count+1

print(count)

Submission status: Accepted

Solution code:
s1s2s3 = str(input())
print (s1s2s3.count('1'))

Submission status: Accepted

Solution code:
s1s2s3 = str(input())
print (s1s2s3.count('1'))

Submission status: Accepted

Solution code:
s = list(input())

cnt = 0

for i in range(3):
    if s[i] == '1':
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
count = 0

for i in s:
    if i == '1':
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input().count("1")

print(s)

Submission status: Accepted

Solution code:
b = list(str(input()))

b_int = [int(n) for n in b]

temp = 0

for n in b_int:
    if n%2:
        temp += 1

print(temp)

Submission status: Accepted

Solution code:
str=input()
a=int(list(str)[0])
b=int(list(str)[1])
c=int(list(str)[2])
print(a+b+c)

Submission status: Accepted

Solution code:
count=0
for i in input():
  if i=='1':
    count+=1
print(count)

Submission status: Accepted

Solution code:
a = list(input())
all = 0
for i in a:
  if i == '1':
    all += 1
print(all)

Submission status: Accepted

Solution code:
S = str(input())
one = '1'
if one in S:
  x = S.count('1')
  print(x)
else:
  print(0)

Submission status: Accepted

Solution code:
a = input()
c = [int(c) for c in a]

print(c.count(1))

Submission status: Accepted

Solution code:
s = input()
x = int(s[0]) + int(s[1]) + int(s[2])
print(x)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

print(str(read()).count('1'))

Submission status: Accepted

Solution code:
a =input()
cnt=0
for i in range(len(a)):
  if a[i] == '1':
    cnt += 1
 
print(cnt)

Submission status: Accepted

Solution code:
s = list(map(int, list(input())))
print(sum(s))

Submission status: Accepted

Solution code:
A=input()
a=0
for i in A:
    if i=="1":
        a+=1
    else :
        a+=0
print(a)

Submission status: Accepted

Solution code:

print(int(input())%9)

Submission status: Accepted

Solution code:
numbers = list(input())
count = 0
for s in numbers:
    a = int(s)
    if a == 1:
        count +=1
print(count)

Submission status: Accepted

Solution code:
s = list( input() )
print(int(s[0]) + int(s[1]) + int(s[2]))

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(3):
  if s[i]=='1':
    count+=1

print(count)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(3):
    if s[i] == '1':
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:

s=input()

print(s.count("1"))

Submission status: Accepted

Solution code:
s=str(input())
count=0
for i in range(3):
    if s[i]=='1':
        count+=1
print(count)

Submission status: Accepted

Solution code:
s = input()
sum = 0
for i in s:
  if i == "1":
    sum += 1
print(sum)

Submission status: Accepted

Solution code:
s1, s2, s3 = map(int, input())
s = s1 + s2 + s3
if s == 3:
    print(3)
elif s == 2:
    print(2)
elif s == 1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
s1,s2,s3=map(int,input())
s=s1+s2+s3
if s==3:
    print(3)
elif s==2:
    print(2)
elif s==1:
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in s:
  if i == '1':
    count += 1
print(count)

Submission status: Accepted

Solution code:
nums = list(input())
print(nums.count("1"))

Submission status: Accepted

Solution code:
x = input()
print(x.count("1"))

Submission status: Accepted

Solution code:
vec = str(input())
cnt = 0
for s in vec:
    if s=="1":
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
a = list(map(int,input()))
b= sum(a)
print(b)

Submission status: Accepted

Solution code:
initStr = input()

number = list(initStr).count('1')

print(number)

Submission status: Accepted

Solution code:
a = input()
b = a.count('1')

print(b)

Submission status: Accepted

Solution code:
s1,s2,s3 = map(int, input())

s = s1 + s2 + s3

print(s)

Submission status: Accepted

Solution code:
s = list(map(int, input()))

cnt = 0
for i in range(len(s)):
    if s[i]:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
print(sum(map(int, list(input()))))

Submission status: Accepted

Solution code:

print(input().count("1"))

Submission status: Accepted

Solution code:
s=list(input())
n = 0

for i in s:
    if int(i) == 1:
        n+=1

print(n)

Submission status: Accepted

Solution code:
s = input()
n = int(s[0]) + int(s[1]) + int(s[2])

print(n)

Submission status: Accepted

Solution code:
s = input()
counter = 0
if s[0]=='1':
    counter+=1
if s[1]=='1':
    counter+=1
if s[2]=='1':
    counter+=1

print(counter)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu May 14 01:17:53 2020

@author: shinba
"""

s = input()

print(s.count("1"))

Submission status: Accepted

Solution code:
s = input()
c = 0
for i in range(3):
    if s[i] == '1':
        c += 1
print(c)

Submission status: Accepted

Solution code:
a = input()

result =0

if a[0]=="1":
	result +=1
if a[1]=="1":
	result +=1
if a[2]=="1":
	result +=1
    
print(result)

Submission status: Accepted

Solution code:
from collections import Counter
s = input()
count = Counter(s)
print(count["1"])

Submission status: Accepted

Solution code:
s = input()
s_list = list(s)
length = 0
for i in s_list:
    if i == "1":
        length += 1
print(length)

Submission status: Accepted

Solution code:
a = str(input())

ONE = a.count('1')

if ONE ==0:
  print(0)
elif ONE ==1:
  print(1)
elif ONE == 2:
  print(2)
elif ONE == 3:
  print(3)

Submission status: Accepted

Solution code:
numlist = list(input())
print(numlist.count("1"))

Submission status: Accepted

Solution code:
s=list(input())
print(s.count('1'))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

print(sum(list(map(int,list(inputS())))))

Submission status: Accepted

Solution code:
s = input()

print(int(s[0]) + int(s[1]) + int(s[2]))

Submission status: Accepted

Solution code:
s = list(input())


def isContain(list):
    count = 0
    if list[0] == '1':
        count += 1
    if list[1] == '1':
        count += 1
    if list[2] == '1':
        count += 1
    print(count)


isContain(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    print(input().count('1'))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
import bisect

def main():
    ans = 0
    for c in input():
        if c == '1':
            ans += 1
    print(ans)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s=int(input())
s=list(str(s))
count=0
for i in range(0,len(s)):
  if s[i]=="1":
    count=count+1
print(count)

Submission status: Accepted

Solution code:
a=input()
count=0
for s in a:
    if s=="1":
        count+=1
print(count)

Submission status: Accepted

Solution code:
s =input()
print(s.count("1"))

Submission status: Accepted

Solution code:
s = input()

count = 0
for c in s:
    if c == "1":
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()

ans = 0

ans += int(s[0])
ans += int(s[1])
ans += int(s[2])

print(ans)

Submission status: Accepted

Solution code:
s = str(input())

print(s.count('1'))

Submission status: Accepted

Solution code:
s = input()

ans = 0

for i in range(len(s)):
  if s[i] == '1':
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = input()
goukei = 0
for i in range(3):
    if int(s[i]) == 1:
        goukei += 1

print(goukei)

Submission status: Accepted

Solution code:
n=input()
i=0
if n[0]=='1':
  i+=1
if n[1]=='1':
  i+=1
if n[2]=='1':
  i+=1
print(i)

Submission status: Accepted

Solution code:
str = input()
str = list(str)

sum = 0
for i in range(3):
  if str[i] == '1':
    sum = sum + 1
print(sum)

Submission status: Accepted

Solution code:
S=input()
cnt=0
for i in range(3):
    if S[i]=="1":
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
s = input()

counter = 0
if s[0] == "1":
    counter += 1
if s[1] == "1":
    counter += 1
if s[2] == "1":
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
S=input()
print(S.count("1"))

Submission status: Accepted

Solution code:
s=input()
ans=s.count("1")
print(ans)

Submission status: Accepted

Solution code:
S = input()
count = 0
for i in range(3):
    if S[i] == '1':
        count += 1
print(count)

Submission status: Accepted

Solution code:
A=input()
print(A.count("1"))

Submission status: Accepted

Solution code:
s1,s2,s3=input()
ss1=int(s1)
ss2=int(s2)
ss3=int(s3)

print(ss1+ss2+ss3)

Submission status: Accepted

Solution code:
from re import findall
print(len(findall(r'1', input())))

Submission status: Accepted

Solution code:
S=raw_input()
ans=0
for x in S:
    if x=="1":
        ans+=1
print ans

Submission status: Accepted

Solution code:
s = list(input())

result = int(s[0]) + int(s[1]) + int(s[2])

print(result)

Submission status: Accepted

Solution code:
s1, s2, s3 = input()
masu = [s1, s2, s3]
print(masu.count('1'))

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(len(s)):
  if s[i] == '1':
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
s=str(input())
c=0
for i in range(0,3):
    if s[i]=="1":
        c+=1

print(c)

Submission status: Accepted

Solution code:
def resolve():
	print(input().count('1'))
resolve()

Submission status: Accepted

Solution code:
s = list(str(input()))
ans = 0
for i in range(3):
    if int(s[i]) == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def ABC_81_A():
    N = input()
    
    print(N.count('1'))

if __name__ == '__main__':

    ABC_81_A()

Submission status: Accepted

Solution code:
l = input()
 
b = 0
 
for i in l[0], l[1], l[2]:
  if (int(i) == 1):
    b = b+1
 
print(b)

Submission status: Accepted

Solution code:
l = input()

b = 0

for i in l[0], l[1], l[2]:
  if (int(i) == 1):
    b = b+1

print(b)

Submission status: Accepted

Solution code:
def main():
    print(list(input()).count('1'))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(len(s)):
    if '1' in s[i]:
        count += 1

print(count)

Submission status: Accepted

Solution code:
s=input()
ans=0
if s[0]=="1":ans+=1
if s[1]=="1":ans+=1
if s[2]=="1":ans+=1
print(ans)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for si in s:
    if si == "1":
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
def main():
    s = int(input())
    s123 = [(s//100), ((s%100)//10), (s%10)]
    cnt = 0
    for n in s123:
        cnt += 1 if n==1 else 0
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
print(Counter(rs())['1'])

Submission status: Accepted

Solution code:
a = str(input())
b = 0

if a[0] == '1':
    b += 1
if a[1] == '1':
    b += 1
if a[2] == '1':
    b += 1
print(b)

Submission status: Accepted

Solution code:
def main():
    print(input().count('1'))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
args = str(input().split())
a = int(args[2])
b = int(args[3])
c = int(args[4])
print(a+b+c)

Submission status: Accepted

Solution code:
def main():
    args = input() #str
    print(list(args).count('1'))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a=list(input())
b=0
if a[0]=='1':
	b=b+1
if a[1]=='1':
	b=b+1
if a[2]=='1':
	b=b+1
print(b)

Submission status: Accepted

Solution code:
sss = input()
print(sss.count("1"))

Submission status: Accepted

Solution code:
s = input()
count = 0
for i in range(len(s)):
    if s[i] == '1':
        count += 1
print(count)

Submission status: Accepted

Solution code:
string = str(input())
print(string.count('1'))

Submission status: Accepted

Solution code:
s=int(input())
if s%3==0:
  if s!=0:
    print(3)
  else:
    print(0)
elif s%3==1:
  print(1)
else:
  print(2)

Submission status: Accepted

Solution code:
a=input()
print(a.count("1"))

Submission status: Accepted

Solution code:
A =input()
print(A.count('1'))

Submission status: Accepted

Solution code:
a = input()
n = 0
for i in a:
    n += int(i)
print(n)

Submission status: Accepted

Solution code:
s = input()

cnt = 0;

for temp in s:
    if temp == "1":
        cnt += 1
print (cnt)

Submission status: Accepted

Solution code:
s=input()
ans=0
for i in s:
    if i=='1':
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
s = input()

count = 0
for i in range(len(s)) :
  if int(s[i]) == 1 :
    count += 1

print (count)

Submission status: Accepted

Solution code:
tmp = list(input())

ans = tmp.count('1')

print(ans)

Submission status: Accepted

Solution code:
charList = list(input())
filtered = [char for char in charList if char == "1"]
filteredNum = len(filtered)
print(filteredNum)

Submission status: Accepted

Solution code:
print(sum([s == "1" for s in input()]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

input_nums=list(input())
ans=int(input_nums[0])+int(input_nums[1])+int(input_nums[2])

print(ans)

Submission status: Accepted

Solution code:

def main():
    print(str(input()).count("1"))

main()

Submission status: Accepted

Solution code:
x = input()
print(x.count('1'))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    s = str(input())
    print(s.count('1'))
    
resolve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    s = input()
    print(s.count('1'))
resolve()

Submission status: Accepted

Solution code:
S=input()
T=S.count("1")
print(T)

Submission status: Accepted

Solution code:
S = input()

print(S.count('1'))

Submission status: Accepted

Solution code:
def main():
    S = input()
    print(sum(1 if s == "1" else 0 for s in S))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s1s2s3 = input()

ans = s1s2s3.count("1")

print(ans)

Submission status: Accepted

Solution code:
S = list(input())

print (S.count('1'))

Submission status: Accepted

Solution code:
x = list(input())
print(x.count("1"))

Submission status: Accepted

Solution code:
def main():
    print(input().count("1"))


main()

Submission status: Accepted

Solution code:
a, b, c=input()
ans = 0
if a == "1":
    ans += 1
if b == "1":
    ans += 1
if c == "1":
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
a = input()
count = 0

for i in range(3):
    if a[i] == "1":
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()
ans = 0
if s[0] == "1":
  ans += 1
if s[1] == "1":
  ans += 1  
if s[2] == "1":
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
A = input()
s = 0
for i in range(len(A)):
  if A[i]=="1":
    s = s + 1
print(s)

Submission status: Accepted

Solution code:
a = input()
b = 0
for i in range(len(a)):
  b += int(a[i]) 
print(b)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

print(input().count("1"))

Submission status: Accepted

Solution code:
a = input()
a = list(a)
x = int(a[0])
y = int(a[1])
z = int(a[2])

if x + y + z == 0:
    print('0')
elif x + y + z == 1:
    print('1')
elif x + y + z == 2:
    print('2')
elif x + y + z == 3:
    print('3')

Submission status: Accepted

Solution code:
a=input()
print(a.count("1"))

Submission status: Accepted

Solution code:
a = input()

atta=0
for i in range(3):
  if a[i]=="1":
    atta += 1
print(atta)

Submission status: Accepted

Solution code:
D = input()
DL = [D[i] for i in range(3)]

print(DL.count('1'))

Submission status: Accepted

Solution code:
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    s_arr = [int(s) for s in _in[0]]
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    cnt = sum(s_arr)
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)

Submission status: Accepted

Solution code:
s = input()

cnt = 0

for num in range(3):
	if s[num] == '1':
		cnt += 1


print(cnt)

Submission status: Accepted

Solution code:
s=list(input())

print(s.count("1"))

Submission status: Accepted

Solution code:
s = input()
 
count = 0
 
for i in s:
  if i == '1':
    count = count + 1
  
print(count)

Submission status: Accepted

Solution code:
s = input()
a = [int(c) for c in s]

print(sum(a))

Submission status: Accepted

Solution code:
S = input()
ans = 0
for i in range(3):
    if S[i] == '1':
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n = input()
print(n.count('1'))

Submission status: Accepted

Solution code:
a = str(input())
count = 0
for i in range(3):
  if int(a[i]) == 1:
    count = count + 1
print(count)

Submission status: Accepted

Solution code:
slist=list(input())
a = 0
for s in slist:
  if int(s):
    a += 1
print(a)

Submission status: Accepted

Solution code:
s=input()
ans=s.count("1")
print(ans)

Submission status: Accepted

Solution code:
s = input()

number = 0
for i in range(len(s)):
  if s[i] == "1":
    number += 1
print(number)

Submission status: Accepted

Solution code:
s = input()

number = 0
if s[0] == "1":
  number += 1
if s[1] == "1":
  number += 1
if s[2] == "1":
  number += 1
print(number)

Submission status: Accepted

Solution code:
s = input()
print(list(s).count("1"))

Submission status: Accepted

Solution code:
s=input()
ans=0

for i in range(len(s)):
    if s[i]=="1":
        ans+=1
    else:
        pass

print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

s = input()
print(s.count("1"))

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for num in s:
    if num == "1":
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
print(input().count('1'))