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: Wrong Answer

Solution code:
S=input()
S_half_front=int(S[:2])
S_half_back=int(S[2:])
S_bool=S_half_front is not S_half_back
if S_bool:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
a = input()

ans = 0
for c in a:
    if c == '0':
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

s = sys.stdin.readline()

ss = s.rstrip()

sss =str(ss)
print(sss.find('1', 1))

Submission status: Wrong Answer

Solution code:
import sys

s = sys.stdin.readline()

ss = s.rstrip()

sss =str(ss)

if ss == '001':
    print(1)
if ss == '010':
    print(1)
if ss == '011':
    print(2)
if ss == '100':
    print(1)
if ss == '101':
    print(2)
if ss == '110':
    print(2)
if ss == '111':
    print(3)

Submission status: Wrong Answer

Solution code:
import sys

a1 = sys.stdin.readline()

b1 = a1.rstrip()

s1 =int(b1)

print(s1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s.count("1") == 0:
	print(0)
	
if s.count("1") == 1:
	print(1)
	
if s.count("1") == 2:
	print(2)

Submission status: Wrong Answer

Solution code:
#http://abc081.contest.atcoder.jp/
# -*- coding: utf-8 -*-

from collections import Counter
n = Counter(list(map(int,input().split())))
print(n[1])

Submission status: Wrong Answer

Solution code:
S = input()

ans = 0
for i in S:
	if i == 1:
		ans += 1

Submission status: Wrong Answer

Solution code:
print(sum([int(x) for x in input().split()]))

Submission status: Wrong Answer

Solution code:
import numpy
S = '000'
numpy.array([i=='1' for i in S]).sum()

Submission status: Wrong Answer

Solution code:
# coding:utf-8
#masu = map(float, input().split())
masu = input()
count = 0
for be in masu:
    be_ = int(be)
    print(be_)
    if be_==1:
        count+=1

print(count)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
#masu = map(float, input().split())
masu = input()
count = 0
print(masu)
for be in masu:
    be_ = int(be)
    print(be_)
    if be_==1:
        count+=1

print(count)

Submission status: Wrong Answer

Solution code:
n = input()
ct = 0
for i in range(len(n)):
  if i == "1":
    ct += 1
    
print(ct)

Submission status: Time Limit Exceeded

Solution code:
from sys import stdin
n = stdin.readline().rstrip()
a = [int(x) for x in stdin.readline().rstrip().split()]
b = 0

print(a)

while True:
   if all([x % 2 == 0 for x in a]):
      a = [x/2 for x in a]
      b += 1
   else:
      break

print(b)

Submission status: Time Limit Exceeded

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

while True:
  print('take')

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

Submission status: Time Limit Exceeded

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

N = int(stdin.readline().rstrip())
num = [int(x) for x in stdin.readline().rstrip().split()]
i = 0
Flag = True
while Flag:
    for i, x in enumerate(num):
        if x % 2 == 0:
            num[i] /= 2
        else:
            print(i)
            Flag = False
            break
    else:
        i += 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for n in s:
    if n == 1:
        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:
print(input().count("1"))

Submission status: Accepted

Solution code:
s = input()
print(s.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:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def I():
    #1 line 1 int
     return int(sys.stdin.readline().rstrip())
def LI():
    #1 line n int
     return list(map(int,sys.stdin.readline().rstrip().split()))
def S():
    #1 line 1 string
     return sys.stdin.readline().rstrip()
def LS():
    #1 line n strings
     return list(sys.stdin.readline().rstrip().split())

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def I():
    # 1 line 1 int
    return int(sys.stdin.readline().rstrip())
def LI():
    # 1 line n ints
    return list(map(int,sys.stdin.readline().rstrip().split()))
def S():
    # 1 line 1 string
    return sys.stdin.readline().rstrip()
def LS():
    # 1 line n strings
    return list(sys.stdin.readline().rstrip().split())

x = S()

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

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

Submission status: Accepted

Solution code:
s1,s2,s3 = map(str, input())
counter = 0
if s1 == "1":
    counter += 1
if s2 == "1":
    counter += 1
if s3 == "1":
    counter += 1
print(counter)

Submission status: Accepted

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

number_list = [s1,s2,s3]

counter = 0

for i in range(len(number_list)):
    if number_list[i] == 1:
        counter += 1
print(counter)

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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)

s = list(str(input()))

ans = [1 if i == "1" else 0 for i in s]

print(sum(ans))

Submission status: Accepted

Solution code:
s = input()

if s == '111':
    print(3)
elif s == '110' or s == '101' or s == '011':
    print(2)
elif s == '100' or s == '010' or s == '001':
    print(1)
else:
    print(0)

Submission status: Accepted

Solution code:
s = list(input())

print(s.count('1'))

Submission status: Accepted

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
count=0

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

print(count)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
a, b, c = int(s[0]), int(s[1]), int(s[2])
count = 0
if a == 1:
  count+=1
if b == 1:
  count+=1
if c == 1:
  count+=1
print(count)

Submission status: Accepted

Solution code:
#第2問　ABC081A
number = list(map(int,input()))
a = 0
for i in number:
    if i == 1:
        a = a+1
print(a)

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()
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
s = input()

print(s.count("1"))

Submission status: Accepted

Solution code:
st_list = list(input())
nu_list = [int(v) for v in st_list]
count = 0
for i in range(len(nu_list)):
  if nu_list[i] == 1:
    count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = 0
for i in s:
    ans += int(i)
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 = int(input())
l=list()
a = (s //100)
b = ((s-a*100) //10)
l.append(s //100)
l.append((s-a*100) //10)
l.append((s-a*100-b*10))
print(l.count(1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = input()

ans=int(0)

if A[0] == "1":
    ans = ans + 1

if A[1] == "1":
    ans = ans + 1

if A[2] == "1":
    ans = ans + 1

print(ans)

Submission status: Accepted

Solution code:
D = input()

A="1"
B="11"
C="101"
F="111"

if F == D:
    print(3)
    
elif B in D:
    print(2)

elif C == D:
    print(2)

elif A in D:
    print(1)

else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#81
data=list(input())
c=0
for i in range(0,len(data)):
    if data[i]=='1':
        c=c+1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
mycode = r'''
# distutils: language=c++
# cython: language_level=3
# cython: boundscheck=False

from libcpp.string cimport string as Str

# 読み込みはpython側で行う
import sys
readline = sys.stdin.buffer.readline # byte読み込み

cdef Str S = readline()[:-1] 
print(S.count(b'1'))

# ここでは練習のためにわざわざC++のstring型で格納している
# pythonのstrではなくbytes型でないとStrに格納できないので注意しよう
# この問題ではpythonのstrを用いても実行速度が変わらないが、S[i]にアクセスする必要がある場合には100倍ほど定数倍が変化する
# 実装量と相談して上手に使い分けよう
'''

import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  # コンパイル時
    import os
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode

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:
i = str(input())
s1, s2, s3 = int(i[0]), int(i[1]), int(i[2])
print(int(s1+s2+s3))

Submission status: Accepted

Solution code:


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    s = input()

    count = 0
    for n in range(3):
        if s[n] == '1':
            count = count + 1

    print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

mass = input()

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

ans = s1 + s2 + s3

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
s = input()
number = "1"

count = s.count(number)
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
num_str = map(str, input().split())
num_joined = ''.join(list(num_str))
print(num_joined.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = 0
for c in input():
    if int(c) == 1:
        num += 1

print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
readline = stdin.buffer.readline
read = stdin.buffer.read
def s_input(): return input().rstrip()
def i_input(): return int(input().rstrip())
def i_map(): return map(int, input().rstrip().split())
def i_list(): return list(i_map())

def main():
    ans = 0
    for s in s_input():
        if s == '1':
            ans += 1 
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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:
#!/user/bin/env pypy3
import sys


def fast_input():
    return sys.stdin.readline()[:-1]

def solve(masus: str):
    masu_list = map(int, list(masus))
    bdama_count = 0
    for masu in masu_list:
        if masu == 1:
            bdama_count += 1
    return bdama_count

def main():
    result = solve(fast_input())
    print(result)

main()

Submission status: Accepted

Solution code:
import sys


def fast_input():
    return sys.stdin.readline()[:-1]

def solve(masus: str):
    masu_list = map(int, list(masus))
    bdama_count = 0
    for masu in masu_list:
        if masu == 1:
            bdama_count += 1
    return bdama_count

def main():
    result = solve(fast_input())
    print(result)

main()

Submission status: Accepted

Solution code:
from sys import stdin
a = [int(x) for x in list(stdin.readline().rstrip())]
y = 0

for x in a:
    if x == 1:
        y += 1

print(y)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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()
print(len([ch for ch in s if ch == "1"]))

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

total = 0
for i in input():
  total += int(i)
print(total)

Submission status: Accepted

Solution code:

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

print(a[0] + a[1] + a[2])

Submission status: Accepted

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

Submission status: Accepted

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s123 = input()

print(s123.count('1'))

Submission status: Accepted

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

a = str(s1 + s2 + s3)

print (a.count('1'))

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

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()
j = 0
for i in range(3):
    if s[i] == "1":
        j += 1
print(j)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(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()
a=s.count("1")
print(a)

Submission status: Accepted

Solution code:
mass = input()
s1 = int(mass[0])
s2 = int(mass[1])
s3 = int(mass[2])
c = 0
if s1 == 1:
  c += 1
if s2 == 1:
  c += 1
if s3 == 1:
  c += 1
print(c)

Submission status: Accepted

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

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 = list(input())
S = list(map(int, S))
print(sum(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = str(int(input()))

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

print(count)

Submission status: Accepted

Solution code:
# 2020-08-27, Thu

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


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


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

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:
S1, S2, S3 = input()
counter = 0
if S1 in "1":
	counter += 1
if S2 in "1":
	counter += 1
if S3 in "1":
	counter += 1
print (counter)

Submission status: Accepted

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

for i in [0, 1, 2]:
  if s[i] == "1":
    c+=1
print(c)

Submission status: Accepted

Solution code:
S = int(input())
c = 0

if S%10 == 1:
  c += 1
if S//100 == 1:
  c += 1
if (S//10)%10 == 1:
  c += 1
print(c)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 081A
s = list(input())
c = s.count('1')
print(c)

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:
arr = [int(_) for _ in input()]
print(sum(arr))

Submission status: Accepted

Solution code:
# coding= utf-8
lol=input("")
S1=int(lol[0:1])
S2=int(lol[1:2])
S3=int(lol[2:3])
Ss=[S1,S2,S3]
cnt=0
Ss.sort()
while 1 in Ss:
  cnt += 1
  del Ss[-1]
else:
  print(cnt)

Submission status: Accepted

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

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:
n = input()
count = 0
if(n[0] == "1"):
    count+=1
if(n[1] == "1"):
    count+=1
if(n[2] == "1"):
    count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sl = [int(x) for x in input()]
n=0
for s in sl:
  if s==1:
    n+=1

print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
count = 0
b = a / 100
reserch_1 = b // 1
if (reserch_1 == 1):
    a = a - 100
    count = count + 1

c = a /10
reserch_2 = c // 1
if (reserch_2 == 1):
    a = a - 10
    count =count + 1

reserch_3 = a // 1
if(reserch_3 == 1):
    count =count + 1
print(count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = 0

for i in s:
  ans += int(i)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

letters = [i for i in list(str(input())) if i == '1']

print(len(letters))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s=input()

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

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

Submission status: Accepted

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


def main():
    args = list(input())
    result = args.count("1")
    print(result)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
str = input()
print(str.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:
n_1 = 0

a = list(str(input()))
for i in a:
    if i == "1":
        n_1 += 1

print(n_1)

Submission status: Accepted

Solution code:
vals = int(input())

val1 = vals//100
val2 = (vals- val1*100)//10
val3 = (vals-val1*100 -val2*10)

print(val1+val2+val3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
mass=list(input())
count=0
 
for i in mass:
  if i=='1':
    count+=1
    
print(count)

Submission status: Accepted

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

mass=list(input())
count=0

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

Submission status: Accepted

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

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

print(str(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:
a,b,c=input()
print(int(a)+int(b)+int(c))

Submission status: Accepted

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

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:

s = input()

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
x = str(input())

print(x.count('1'))

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:
val = input()
vals = list(val)

sum=0
for v in vals:
  sum += int(v)
  
print(sum)

Submission status: Accepted

Solution code:
li = list(input())

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numList = list(input())
total = 0
for i in range(len(numList)):
  total += int(numList[i])
print(total)

Submission status: Accepted

Solution code:
s=str(input())
numbers=[]
for i in s:
    numbers.append(i)
    

##3print(numbers)

count=0
for number in numbers:
    if number=='1':
        count+=1
        
print(count)

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
count = 0;
if a // 100 == 1:
  count += 1
  a -= 100
if a // 10 == 1:
  count += 1
  a -= 10
if a == 1:
  count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    s = input()
    cnt = 0
    for i in s:
        if i == '1':
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = int(input())

s1 = int(s/100)
s2 = int((s-s1*100)/10)
s3 = int((s-s1*100-s2*10))

n = 0

if s1 ==1 :
  n += 1

if s2 ==1 :
  n += 1

if s3 == 1 :
  n += 1
  
print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

def main():
    S = input()

    ans = 0
    for s in S:
        if s == '1':
            ans +=1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
print collections.Counter(raw_input())['1']

Submission status: Accepted

Solution code:
x=input()
X=list('{}'.format(x))
a=[]
for i in range(len(X)):
    a.append(int(X[i]))
A=sum(a)
print(A)