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:
matrix = str(input())
marble_count = 0
if matrix[0]=='1':
  marble_count += 1
if matrix[1]=='1':
  marble_count += 1
if matrix[2]=='1':
  marble_count += 1
print(marble_count)

Submission status: Accepted

Solution code:
N = input()
ans = 0
for x in N:
  if x == '1':
    ans += 1
  else:
    pass
print(ans)

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:
str = input()
count = 0
for i in range(3):
    if str[i] == '1':
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()
print(len(list(filter(lambda x:x=='1',s))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1s2s3 = input()

s = str(s1s2s3)
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
print(len([a for a in s if a == '1']))

Submission status: Accepted

Solution code:
""" AtCoder """

S = input()

print(S.count('1'))

Submission status: Accepted

Solution code:
a = int(input(), 2)

print(bin(a).count('1'))

Submission status: Accepted

Solution code:
n = int(input(), 2)
count  = 0
while n > 0:
    n = n & (n - 1)
    count += 1
print(count)

Submission status: Accepted

Solution code:
n = list(input())
cnt = 0
for s in n:
    if s == '1':
        cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#encoding:utf-8

s = list(input())

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

print(count)

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(list(s).count("1"))

Submission status: Accepted

Solution code:
num = list(map(int, str(input())))
print(str(num[0] + num[1] + num[2]))

Submission status: Accepted

Solution code:
print(len(input().replace('0','')))

Submission status: Accepted

Solution code:
def main(argv):
    # type: (str) -> None
    print(argv.count('1'))
    return


if __name__ == '__main__':
    main(input())

Submission status: Accepted

Solution code:
line = input()
s = list(line)
c = 0

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

print(c)

Submission status: Accepted

Solution code:
raw_str = input()

counter = 0
if raw_str[0] == '1':
    counter += 1
if raw_str[1] == '1':
    counter += 1
if raw_str[2] == '1':
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
i=input()

print (i.count("1"))

Submission status: Accepted

Solution code:
value = input()

count = 0
for s in value:
  if s == "1":
    count += 1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
### coding: UTF-8

#import random as rd
#import numpy as np

line=list(map(int,input()))
#line=[1,0,1]

print(sum(line))

Submission status: Accepted

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

print(a + b + c)

Submission status: Accepted

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

print(sum([int(i) for i in input() ]))

Submission status: Accepted

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

count = 0

for char in input():
    if char == '1':
        count += 1

print(count)

Submission status: Accepted

Solution code:
S = input()
ans = sum([int(s) for s in S])
print(ans)

Submission status: Accepted

Solution code:
a, b, c = map(int, input())
list = [a,b,c]
count = 0
for num in list:
    if num == 1:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
while s >= 10:
    s = int(s /10) + s % 10

print(s)

Submission status: Accepted

Solution code:
a = input()
ans = 0

for i in range(3):
    if (a[i] == '1'):
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s = input()

import numpy as np
ary = np.array(list(s), dtype=int)
print((ary == 1).sum())

Submission status: Accepted

Solution code:
def choise(s):
  return len(list(filter(lambda x:x=='1',s)))

if __name__ == "__main__":
    i1 = input()
    print(choise(i1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
counter = 0

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

print(str(counter))

Submission status: Accepted

Solution code:
s = input()
cnt = 0

if '1' in s[0]:
    cnt += 1
if '1' in s[1]:
    cnt += 1
if '1' in s[2]:
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
a = input()
regex = '^(\d)(\d)(\d)'
s1 = int(re.sub(regex, r'\1', a))
s2 = int(re.sub(regex, r'\2', a))
s3 = int(re.sub(regex, r'\3', a))
i = 0
if s1 == 1:
    i += 1
if s2 == 1:
    i += 1
if s3 == 1:
    i += 1
print(i)

Submission status: Accepted

Solution code:
s = input()

ans = 0
for c in s:
    ans += int(c)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    s = input()

    print(s.count('1'))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#0が1を3つ入力
a, b, c = map(int, input())

#aからcそれぞれが1と等しいかどうかを判断し、等しいのであれば順次iに1を足していく
i = 0

#aについて
if a==1:
    i += 1
    
#bについて
if b==1:
    i += 1    

#cについて
if c==1:
    i += 1
    
#出力
print(i)

Submission status: Accepted

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


abc081_a()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    print(sum(map(int, iter(input()))))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
print(Counter(list(input()))['1'])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = map(int, list(raw_input())) #入力した時にリストでSを配列
print sum(s) #s[0]~s[N]までの合計を出す

Submission status: Accepted

Solution code:
num=str(input())

print(num.count("1"))

Submission status: Accepted

Solution code:
s = input().strip()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,c=map(str,input())
S = a+b+c
print(S.count("1"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Placing Marbles
print(sum(map(int, input())))

Submission status: Accepted

Solution code:
a = map(int,list(input()))
ans = 0
for i in a:
    ans += i
    
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:
n = str(input())
count = 0
for i in range(len(n)):
  if n[i] == '1':
    count += 1
  else:
    count += 0
print(count)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
sx=input()
s_list=list(sx)
n=0
for i in range(0,3):
        if int(s_list[i])==1:
                n+=1

print(n)

Submission status: Accepted

Solution code:
e = input().split()

tmp = e[0].replace('0', '')
print(len(tmp))

Submission status: Accepted

Solution code:
strs = input()

ans = 0
for s in strs:
  if s == "1":
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
s = str(input())
S = 0

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

result = 0
if s[0] == '1':
    result += 1
if s[1] == '1':
    result += 1
if s[2] == '1':
    result += 1
print(result)

Submission status: Accepted

Solution code:
print(sum([len(c) for c in input().split("0")]))

Submission status: Accepted

Solution code:
s = input()

result = 0
if s[0] == '1':
    result += 1
if s[1] == '1':
    result += 1
if s[2] == '1':
    result += 1

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
dat = input()
print(dat.count('1'),end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
count = 0

if s[0] == '1':
  count += 1
if s[1] == '1':
  count += 1
if s[2] == '1':
  count += 1

print(count)

Submission status: Accepted

Solution code:
str_list = list(input())
n = sum(x=="1" for x in str_list)
# 出力
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(input_s)

Submission status: Accepted

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

Submission status: Accepted

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

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:
s13 = input()
l = list(s13)

print(l.count('1'))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = int(input())
l = [int(x) for x in list(str(s))]

sum = 0
for i in l:
  if i == 1:
    sum += 1

print(sum)

Submission status: Accepted

Solution code:
s=input()
C=0
N=0
while C<3:
  if s[C]=="1":
    N+=1
  C+=1
print(N)

Submission status: Accepted

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

Submission status: Accepted

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

b=[int(i) for i in a]

c=0

for i in range(3):
    if(b[i]==1):
        c+=1

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(3):
    if int(a_lis[i]) == 1:
        count = count +1
    else:
        pass

print(count)

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()
bi = 0
for i in list(s):
    if i == '1':
        bi += 1

print(bi)

Submission status: Accepted

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

Submission status: Accepted

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

a =str( input())

char_list = list(a)

b=int( char_list[0])
c=int( char_list[1])
d=int( char_list[2])

s=b+c+d

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

count = 0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = [i for i in input()]
print(li.count('1'))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
xs = [x for x in map(int, list(input())) if x == 1]
print(len(xs))

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
a = input()

cont = 0
for i in range(0, len(a)) :
  if (int(a[i]) == 1):
    cont = 1 + cont
print(cont)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = int(input())
s = str(a)
print(sum(list(map(int, list(s)))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=list(input())
#print(num)
n=0
for i in range(3):
    if num[i] =="1":
        n+=1
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
s=input()
print(s.count('1'))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, list(input()));
print( a + b + c );

Submission status: Accepted

Solution code:
s = input()
c = 0
if(s[0] == "1"):
    c += 1


if(s[1] == "1"):
    c += 1


if(s[2] == "1"):
    c += 1

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
print(a%2+(a//10)%2+(a//100)%2)

Submission status: Accepted

Solution code:
char_to_int=input()

count = 0
for i in char_to_int:
  count+=int(i)
 
print(count)

Submission status: Accepted

Solution code:
n = str(input())

counter = 0

for i in range(3):
  if n[i] == '1':
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
n = int(input())

if n % 3 == 1:
   print(1)
elif n % 3 == 2:
   print(2)
elif  n % 3 == 0 and n != 000:
   print(3)
else:
   print(0)

Submission status: Accepted

Solution code:
s1, s2, s3 = [int(_) for _ in (list(input()))]
print(s1+s2+s3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

n = s.count('1')
print(n)

Submission status: Accepted

Solution code:
s=int(input())
ans=0
if s>=100:
    ans+=1
    s=s-100
if s>=10:
    ans+=1
    s=s-10
if s>=1:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
A=[]
a=input()
for i in a:
    A.append(i)
o=A.count("1")
print(o)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#coding: utf-8
print(input().count("1"))

Submission status: Accepted

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

Submission status: Accepted

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

a = str(input())

print(a.count("1"))

Submission status: Accepted

Solution code:
s = input()
i = 0

s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])

print(s1 + s2 + s3)

Submission status: Accepted

Solution code:
listS=list(input())
index=0
sum=0
while index < len(listS):
    if listS[index]=="1":
        sum+=1
    index+=1
print(sum)

Submission status: Accepted

Solution code:
masu=input()
count=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n  = input()
res=0
for l in n:
  res+=int(l)
print(res)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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:
s = [i for i in input()]
res = 0
for i in s:
  if i == "1":
    res += 1

print(res)

Submission status: Accepted

Solution code:
#At Corder Beginner Contest 081 A-Placing Marbles

string = input()
cnt = 0

for c in string:
    if c == "1":
        cnt+=1

print(str(cnt))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len(input().replace("0","")))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S1,S2,S3=map(int,input())
print(S1+S2+S3)

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:
num = input()
l = [str(x) for x in list(str(num))]
l.count("1")
print(l.count("1"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

arr = [s1, s2, s3]

print(arr.count(1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(input())
ans = 0
for i in range(3):
    if  a[i]  == "1":
        ans +=1

print(ans)

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 = int(input())
s3 = s % 10
s2 = (s - s3)/10%10
s1 = (s-s3-s2*10)/100
N = int(s1+s2+s3)
print(N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
ans=0
for c in s:
  ans+=1 if c=="1" else 0
print(ans)

Submission status: Accepted

Solution code:
s = input().strip()

print(s.count("1"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = 0
for s in S:
    ans += int(s)
print(ans)

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def main():
    S = input()
    print(S.count("1"))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(len(list(filter(lambda c: c == '1', input()))))

Submission status: Accepted

Solution code:
#let
[s1, s2, s3] = list(input())
s = [s1, s2, s3]

#var
ans = sum(map(int, s))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


# --------------------------------------------

dp = None


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


main()

Submission status: Accepted

Solution code:
# vim: set fileencoding=utf-8 :
s = str(raw_input())
print(s.count("1"))

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:
S = input()
print(S.count("1"))

Submission status: Accepted

Solution code:
def SolveABC081A(s1,s2,s3):
    print int(s1) + int(s2) + int(s3)


s1,s2,s3 = raw_input()


SolveABC081A(s1,s2,s3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_list = list(input())

print(input_list.count('1'))

Submission status: Accepted

Solution code:
S=input()
num_list=list(S)
sum=0
for s in num_list:
    if s=='1':
        sum+=1
print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# cook your dish here
s=list(input())
print(s.count('1'))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
s=s.replace("0","")
print(len(s))

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#coding:utf-8
s=input()
s=s.count("1")
print(s)

Submission status: Accepted

Solution code:
nums = input()

ans = 0
for num in nums:
    if num == '1':
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
string = input()

one_counter = 0
for s in string:
  if s =="1":
    one_counter += 1

print(one_counter)

Submission status: Accepted

Solution code:
r = 0
for x in raw_input():
	r += int(x)
print r

Submission status: Accepted

Solution code:
from functools import reduce
print(reduce(lambda x, y: x+1 if y == 1 else x, [int(_) for _ in input()]))

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:
s = input()
ans = 0
for i in range(0,len(s)):
	if s[i]=='1':
		ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c = map(int, list(input()))
bee = 0
if a == 1:
	bee += 1
if b == 1:
	bee += 1
if c == 1:
	bee += 1
	
print(bee)

Submission status: Accepted

Solution code:
a = str(input())

count = 0

for s in a:
  if int(s) == 1:
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

if a[0] == '1':
    cnt+=1
if a[1] == '1':
    cnt+=1
if a[2] == '1':
    cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
def main():
    s = input().strip()
    print(len([1 for i in s if i == '1']))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
#入力を読み取る。
x = input()
#内包表記でxを行列に
y = np.array([int(x[i]) for i in range(3)])
#1の数を表示
print(len(y[y==1]))

Submission status: Accepted

Solution code:
A=input()
cnt=0
if A[0]=='1':
    cnt+=1
if A[1]=='1':
    cnt+=1
if A[2]=='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:
l = input()
t = 0
for c in l:
    if c == '1': t+=1
print(t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

lis = list()

for i in range(len(s)):
    lis.append(s[i])

print(lis.count("1"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A=int(input())

print(A//100+(A%100)//10+(A%100)%10)

Submission status: Accepted

Solution code:
num=[int(x) for x in input()]
print(sum(num))

Submission status: Accepted

Solution code:
from collections import Counter
c = Counter(raw_input())
print c['1']

Submission status: Accepted

Solution code:
S = input()

cnt = 0
for i in S:
    if i == "1":
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s=input()
print(sum([1 for c in s if c=='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:
a = input()
d = list(a)
c = 0
for v in d:
    if(v=='1'):
        c = c+1
print(c)

Submission status: Accepted

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

instr = input()

print(instr.count("1"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#codigng: utf-8
from sys import stdin

bin  = list(stdin.readline().rstrip())
one = [x for x in bin if x == '1']

print(len(one))

Submission status: Accepted

Solution code:
print(sum(map(int,input().strip())))

Submission status: Accepted

Solution code:
#くじ引き

import numpy
import re
import math

def main():
	"""
	テストコード実行
	:return:
	"""
	line = input()
	char_list = list(line)
	int_list = [int(s) for s in char_list]
	count = 0
	for i in int_list:
		if i == 1:
			count += 1
	print(count)


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = map(int, list(input()))
print(len([s for s in S if s == 1]))

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 a in s:
    if(a == '1'):
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:

s = input()

counter = 0
for character in s:
    if int(character) == 1:
        counter+=1

print(counter)

Submission status: Accepted

Solution code:
s = input()

cnt = 0

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

print(cnt)