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:
s = input()
if s=='000':
  print(0)
elif s=='001' or s=='010' or s=='100':
  print(1)
elif s=='011' or s=='101' or s=='110':
  print(2)
else:
  print(3)

Submission status: Accepted

Solution code:
N = list(input())

print(len([i for i in N if i == "1"]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
print(n%9)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a,b = map(int, input().split())
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    ss = list(map(int, list(input())))
    ans = sum(ss)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()

ans = 0

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

ans = 0

for i in s:
    if i == '1':
        ans += 1
    
    if i == '0':
        continue

print(ans)

Submission status: Accepted

Solution code:
print(eval(input().replace("", "+").strip("+")))

Submission status: Accepted

Solution code:
l = [int(v) for v in list(input())]
print(l.count(1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import sqrt

input = sys.stdin.readline


def I():
    return int(input())


def MI():
    return map(int, input().split())


inf = float("inf")
mod = 10 ** 9 + 7


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
import math

s=input()

print(s.count('1'))

Submission status: Accepted

Solution code:
a=input().split('1')
b=len(a)-1
print(b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = input()

data_list = [int(i) for i in data]

print(sum(data_list))

Submission status: Accepted

Solution code:
n=0
for s in input().strip():
  if s=="1":
    n+=1
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = list(input())
c = 0
for val in l:
  if val == '1':
    c += 1
print(c)

Submission status: Accepted

Solution code:
s=input()
s=s.count("1")
print(0if s==0 else 1if s==1 else 2if s==2 else 3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

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

Submission status: Accepted

Solution code:
l = input()
sum = 0
num = list(l)
#print(num)
for i in num:
  if(i=='1'):
    sum += 1
print(sum)

Submission status: Accepted

Solution code:
ss = input()

print(ss.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

count = 0

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

print(count)

Submission status: Accepted

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

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:
s = input()
print(int(s.count('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()
count = 0
for i in s:
    if i == '1':
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

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

print(counter)

Submission status: Accepted

Solution code:
s=input()
S=[a for a in s]
number=0
for b in S:
    if b=='1':
        number+=1
print(number)

Submission status: Accepted

Solution code:
# coding:utf-8
def main():
    num = input()
    count = 0

    for i in num:
        if i == '1':
            count = count + 1
    print(count)

if __name__ == '__main__' :
    main()

Submission status: Accepted

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

print(put)

Submission status: Accepted

Solution code:
S = str(input())

print(sum(s=="1" for s in S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 20:23:02 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

s = ns()

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

print(ans)

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:
s = input()

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

print(str(s1+s2+s3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(map(int,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()
print(int(s[0]) + int(s[1]) + int(s[2]))

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:
input = input()
output = len([x for x in input if x == '1'])
print(output)

Submission status: Accepted

Solution code:
s=input()
ans=0
for c in s:
    ans+=int(c)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
firststr = input()

result = re.findall(r'1',firststr)
print(len(result))

Submission status: Accepted

Solution code:
# A - Placing Marbles
s=input()
cnt=0
for i in range(len(s)):
    if s[i]=='1':
        cnt+=1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

print(numbers)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c=input()
list =[a,b,c]
sum = 0
for i in list:
  if i == "1":
    sum += 1
  else:
    sum += 0
    
print(sum)

Submission status: Accepted

Solution code:
a,b,c = [int(i) for i in input()]
print(a+b+c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(a+b+c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

count = 0
for si in s:
    if si == "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:
def resolve():
    s = input()
    print(s.count('1'))
    
resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_number = int(input())
hundred = int(input_number / 100)
ten = int((input_number - hundred * 100) / 10)
one = int((input_number -(hundred * 100 + ten * 10) /1))
print(hundred + ten + one)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

cnt = 0
for l in S:
    if l == '1':
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
S = map(int, raw_input())
davidscock = 0
for i in S:
    if i == 1:
        davidscock += 1
print davidscock

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
count = 0

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

print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

#print(a)
#print(b)
#print(c)

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

print(ans)

Submission status: Accepted

Solution code:
data = input()

# 初期化
count = 0

for i in range(len(data)):
    if data[i] == '1':
        count += 1

print(count)

Submission status: Accepted

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


def main():
    #N = map(int, open(0).read().split())
    N = input()
    ans = 0

    if N[0] == '1':
        ans += 1
    if N[1] == '1':
        ans += 1
    if N[2] == '1':
        ans += 1
    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#081_A
print(input().count('1'))

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

print(sum(s))

Submission status: Accepted

Solution code:
def marbles(s):

    return s.count("1")

def main():
    s = str(input())
    print(marbles(s))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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()
list0=["000"]
list1=["100","010","001"]
list2=["110","101","011"]
list3=["111"]
if s in list0:
    print(0)
if s in list1:
    print(1)
if s in list2:
    print(2)
if s in list3:
    print(3)

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()
cnt = 0
for i in s:
    if int(i) == 1:
        cnt += 1
    else:
        cnt = cnt
print(cnt)

Submission status: Accepted

Solution code:
abc = int(input())
a = abc//100
b = (abc - a*100) // 10
c = abc - (a*100+b*10)
print( a+b+c )

Submission status: Accepted

Solution code:
be = int(input())
count = 0

for i in range(3):
    if be % 2 == 1:
        count +=1

    be = int(be / 10)

print(count)

Submission status: Accepted

Solution code:
s = str(input().split())
ans = 0
for i in range(len(s)):
    if s[i] == "1":
        ans += 1
    else: ans += 0
    
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,c =map(int,input())
s=[a,b,c]
print(s.count(1))

Submission status: Accepted

Solution code:
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
mod=10**9+7

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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 range(len(s)):
  if s[i] == "1":
    count +=1
    
  
print(count)

Submission status: Accepted

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

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:
n = input().split("0")
print(len(''.join(n)))

Submission status: Accepted

Solution code:
# coding: utf-8

 
def main():
 
    input_ = input()
    
    print(input_.count('1'))
  
    return 0
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()
b = 0
for i in range(len(a)):
    if a[i] == "1":
        b += 1

print(b)

Submission status: Accepted

Solution code:
print(sum(map(int, (s for s in input()))))

Submission status: Accepted

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

print(sum(s))

Submission status: Accepted

Solution code:
S = input()

print(S.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(sum([int(i) for i in list(input()) if int(i) == 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=list(input())
t = 0
if s[0] == '1':
    t+=1
if s[1] == '1':
    t+=1
if s[2] == '1':
    t+=1
print(t)

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()

print(int(s[:1]) + int(s[1:2]) + int(s[2:3]))

Submission status: Accepted

Solution code:
l=list(str(input()))
i=int(l[-1])+int(l[-2])+int(l[-3])



print(i)

Submission status: Accepted

Solution code:
import re

num = input()
cnt = num.count('1')
print(cnt)

Submission status: Accepted

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

marble = int(slist[0]) + int(slist[1]) + int(slist[2])
print(str(marble))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    s = input()

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

    print(ans)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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:
param = [int(a) for a in input()]
result = param.count(1)
print(result)

Submission status: Accepted

Solution code:
sum = 0
for s in input():
  sum += int(s)
print(sum)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

count = 0

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

print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

value = input()

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

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:
# coding: utf-8
# Your code here!
nums = input()
nums = [str(x) for x in nums]

print(nums.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
c = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
result = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys

CELL_LENGTH = 9999
TOKEN = [">", "<", "+", "-", ".", ",", "[", "]"]

"""
"""; bfcode = """
+++[>,[>+<-]++++
[>--------<-]<-]>>.
""".strip()

"""

101
ABC 081 A Placing Marbles
bfcode by koi_koTya
"""; read = """
""".strip()[::-1]

if len(read) == 0:
    read = sys.stdin.read()[::-1]

read = list(read)
cells = bytearray([0] * CELL_LENGTH)
write = ""
seek = 0
ptr = 0

def ci(n): return n % CELL_LENGTH
def csize(n): return n % 256

while seek < len(bfcode):
    if bfcode[seek] == TOKEN[0]:
        ptr += 1

    elif bfcode[seek] == TOKEN[1]:
        ptr -= 1

    elif bfcode[seek] == TOKEN[2]:
        cells[ci(ptr)] = csize(cells[ci(ptr)] + 1)

    elif bfcode[seek] == TOKEN[3]:
        cells[ci(ptr)] = csize(cells[ci(ptr)] - 1)

    elif bfcode[seek] == TOKEN[4]:
        write += chr(cells[ci(ptr)])

    elif bfcode[seek] == TOKEN[5]:
        if read: cells[ci(ptr)] = ord(read.pop())

    elif bfcode[seek] == TOKEN[6]:
        # 0 < cells[ptr] なら何もしない。次の文字へ進む
        # cells[ptr] == 0 なら、"同階層の ']'" まで seek を進める
        if cells[ptr] == 0:
            level = 1
            while level != 0:
                seek += 1
                if seek == len(bfcode):
                    print("'{}' is missing".format(TOKEN[7]))
                    sys.exit(1)
                if bfcode[seek] == TOKEN[6]:
                    level += 1
                elif bfcode[seek] == TOKEN[7]:
                    level -= 1

    elif bfcode[seek] == TOKEN[7]:
        # cells[ptr] == 0 なら何もせず次の文字へ進む
        # 0 < cells[ptr] なら、"同階層の ']'" まで seek を戻す
        if cells[ptr] != 0:
            level = 1
            while level != 0:
                seek -= 1
                if seek < 0:
                    print("'{}' is missing".format(TOKEN[6]))
                if bfcode[seek] == TOKEN[7]:
                    level += 1
                elif bfcode[seek] == TOKEN[6]:
                    level -= 1
    seek += 1

if __name__ == "__main__":
    print(write)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
square = input()
squList = [i for i in square]
print(squList.count("1"))

Submission status: Accepted

Solution code:
s = (int)(input())
s1 = s//100
s2 = (s%100)//10
s3 = (s%10)

print((str)(s1+s2+s3))

Submission status: Accepted

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

Submission status: Accepted

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


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

print(c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

ans = len([j for j in input().rstrip() if j == '1'])
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
i = 0

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

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 入力 : s1s2s3
abc = input()
# カウンターを用意
counter = 0
if abc[0] == "1" :
    counter += 1
if abc[1] == "1" :
    counter += 1
if abc[2] == "1" :
    counter += 1

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_line = input()
count = 0
for i in range(len(input_line)):
  if input_line[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()

ans=0

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

print(ans)

Submission status: Accepted

Solution code:
a = input()
#print(a,type(a))
#print(a[0],type(a[0]))
count=0
if a[0]=="1":
    count +=1
if a[1]=="1":
    count=count+1
if a[2]=="1":
    count=count+1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
N=input()
a=0

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

Submission status: Accepted

Solution code:
N=int(input())
a=0

for i in range(3)[::-1]:
  if N>=10**i:
    N-=10**i
    a+=1
print(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:
str = input().split()
s = str[0]
list = (s[0], s[1], s[2])
print(list.count("1"))

Submission status: Accepted

Solution code:
import re

s=re.findall(r"1",input())
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b,c = map(int, input().strip())
0 <= a <= 1
0 <= b <= 1
0 <= c <= 1

print(a + b + c)

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

Submission status: Accepted

Solution code:
x =0
s1s2s3 = input()
for i in range(3):
    if s1s2s3[i]=="1":
        x = x + 1
    else:
        pass
print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
b = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
txt = input()

counter = Counter(txt)

print(counter['1'])

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)

#わからなかった
#数字を文字として受け取って配列として考える