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:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
lst1 = list(readline().rstrip().decode('utf-8'))
ans = 0
for i in lst1:
    ans += int(i)
print(ans)

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:

n=int(input())  #数値入力 「N」だけの入力のとき
print(str(n).count('1'))

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()
s = [int(i) for i in s]
ans = sum(s)
print(ans)

Submission status: Accepted

Solution code:
s = input()
print( sum( [ s[i]=='1' for i in range(len(s)) ] ) )

Submission status: Accepted

Solution code:
def main():
    s = input()
    print( sum( [ s[i]=='1' for i in range(len(s)) ] ) )
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 29, Jan, 2020
"""

import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

s = readline().decode('utf8')
print(s.count('1'))

Submission status: Accepted

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

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

Submission status: Accepted

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

print(a+b+c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputnum = input()
count = 0

for i in range(3):
    if inputnum[i] == str(1):
        count +=1

print(count)

Submission status: Accepted

Solution code:
s=list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#整数値入力 1文字の入力
def input_one_number():
    return int(input())

n = input_one_number()

cnt = 0
while n > 0:
    cnt += n%10
    n //= 10

print(cnt)

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()

ans = s.count('1')

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
a = input()
b = 0
for i in range(3): 
    if a[i] =='1':
        b += 1
print(str(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
s=int(input())
a=[i for i in str(s)]
print(a.count("1"))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
import collections
print(collections.Counter(input())["1"])

Submission status: Accepted

Solution code:
int = str(input())

a = 0
for x in range(len(int)):
  if int[x] == "1":
    a +=1
   
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
def main():
    unko = raw_input()
    unko_ans = 0
    for i in range(3):
        if unko[i] == '1':
            unko_ans = unko_ans + 1
    print(unko_ans)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import collections

def m0():
    args = sys.stdin.read().split()
    s = args[0]
    cnt = list(s).count('1')
    print(cnt)

def m1():
    args = sys.stdin.read().split()
    s = args[0]
    counter = collections.Counter(list(s))
    print(counter['1'])

if __name__ == "__main__":
    m1()

Submission status: Accepted

Solution code:


import numpy as np

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""AtCoder Beginner Contest 081: A - Placing Marbles
https://atcoder.jp/contests/abc081/tasks/abc081_a
"""

__author__ = 'bugttle <bugttle@gmail.com>'


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s_input = str(input())
 
s_1 = s_input[0:1]
s_2 = s_input[1:2]
s_3 = s_input[2:3]
 
count = 0
 
s_list = [s_1, s_2, s_3]
 
for s in s_list:
    if s == "1":
        count = count + 1
    else:
        None
      
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
num = input()
i = 0
sum = 0
while i <= len(num)-1:
  sum += int(num[i])
  i += 1

print(sum)

Submission status: Accepted

Solution code:
s = list(input())

count = 0

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

print(count)

Submission status: Accepted

Solution code:
Si = input()
S1 = int(Si[0])
S2 = int(Si[1])
S3 = int(Si[2])
n = 0
if S1:
  n += 1
if S2:
  n += 1
if S3:
  n += 1
print(n)

Submission status: Accepted

Solution code:
s = input()

#個数の初期化
sum = 0

#全探索
for i in range(len(s)):
    if s[i] == '1':
        sum += 1

print(sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    S = S.replace("0","")

    print(len(S))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
d = input()

num = 0

if d[0] == "1":
  num += 1
if d[1] == "1":
  num += 1
if d[2] == "1":
  num += 1
  
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = input()

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

Submission status: Accepted

Solution code:
num = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = input()
b = int(a)

count = 0
for i in a:
    if i == '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:
a=list(input())
# print(a)
N=0

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

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:
import sys
from collections import Counter
def counter(li, n):
    count = Counter()
    count.update(li)
    return count[n]
input = sys.stdin.readline
li = input().strip()
print(counter(li, "1"))

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    s = input()
    ans = 0
    for i in range(3):
        if s[i]=='1':
            ans += 1
    print(ans)
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

s = input()
ss = [int(i) for i in s]
print(np.sum(ss))

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

count = 0
for i in ss:
  if i == '1':
    count+=1

print(count)

Submission status: Accepted

Solution code:
# 値を受け取る
m = input()

# 1の個数を判定
cnt = 0
for i in range(3):
    if m[i] == "1":
        cnt += 1

# 個数を出力
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mass=input()
count=0
for i in range(len(mass)):
    if mass[i]=='1':
        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:
#1,2,3の番号がついた3マスに，それぞれ"0"か"1"がある．"1"のマスはいくつあるか

s = input()
a = [int(c) for c in s]
print (a[0]+a[1]+a[2])

Submission status: Accepted

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

s = input()

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

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:
n = input()
square = []
square.append(int(n[0]))
square.append(int(n[1]))
square.append(int(n[2]))
ans = 0
for i in range(0, 3):
    if square[i] == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = list(input())

print(N.count("1"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

a = input()

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

Submission status: Accepted

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

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)
else:
    print(counter)

Submission status: Accepted

Solution code:
a, b, c = input()
a = int(a)
b = int(b)
c = int(c)
i = 0 # カウンタの初期化
if a == 1:
    i += 1
    if b == 1:
        i += 1
        if c == 1:
            i += 1
            print(i)
        else:
            print(i)
    else:
        if c == 1:
            i += 1
            print(i)
        else:
            print(i)
else:
    if b == 1:
        i += 1
        if c == 1:
            i += 1
            print(i)
        else:
            print(i)
    else:
        if c == 1:
            i += 1
            print(i)
        else:
            print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc086/tasks/abc086_a
number = input()

n_one = 0
for n in range(3):
    if int(str(number)[n]) == 1:
        n_one += 1

print(n_one)

Submission status: Accepted

Solution code:
n=input()

print(n.count("1"))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
s = input()
cnt = 0
for i in s:
    if i == "1":
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
s = input()

s_list = [int(s[0]), int(s[1]), int(s[2])]

count = 0
for i in s_list:
  if i == 1:
    count += 1
    
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())
f = lambda x:1 if x=='1' else 0
y = list(map(f, s))
print(sum(y))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

s1=x//100
s2=x//10%10
s3=x%10

print(s1+s2+s3)

Submission status: Accepted

Solution code:
a = input()
cnt=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

num = input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

s = list(input())
count = 0
for i in s:
    if i == "1":
        count += 1
print(count)

Submission status: Accepted

Solution code:
def main():
  s = input()
  c = 0
  for i in s:
    c += int(i)
  print(c)

if __name__ == "__main__":
  main()

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#https://atcoder.jp/contests/abc081/tasks/abc081_a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def validation(i):

    if i == 0 or i == 1:
        return i

    else:
        return 0

square = map(validation, [int(i) for i in input().strip()])

print(list(square).count(1))

Submission status: Accepted

Solution code:
# coding: utf-8
import sys


def main(argv=sys.argv):
  list1 = list(input()) 
  print(list1.count('1'))
  
  return 0


if __name__ == '__main__':
  sys.exit(main())

Submission status: Accepted

Solution code:
# coding: utf-8
import sys


def main(argv=sys.argv):

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

    return 0


if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
s = int(input())
l = []
while s > 0:
	l.append(s%10)
	s //= 10

print(l.count(1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline().rstrip()

def main():
    return s.count('1')

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# s1,s2,s3=map(str,input().split())
s1s2s3=str(input())
# a=s1+s2+s3
b=0

for i in s1s2s3:
    b=b+int(i)

print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

print(count)

Submission status: Accepted

Solution code:
s = input()
count = 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:
x = None
s = list([x, x, x])
result = 0
s[0], s[1], s[2] = map(int, input()) # 0 or 1
for i in range(len(s)):
    if s[i] == 1:
        result += 1
print(result)

Submission status: Accepted

Solution code:
s = input()
print('{}'.format(sum([int(i) for i in s])))

Submission status: Accepted

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

Submission status: Accepted

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

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:
ls=input()
i=0
for x in ls:
    if x=='1':
        i+=1

print(i)

Submission status: Accepted

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

count = 0
for i in line:
    if i == "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:
import math

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

Submission status: Accepted

Solution code:
# Problem https://atcoder.jp/contests/abc081/tasks/abc081_a
# Python 3rd Try


def solver(str):
    result = 0
    if str[0] == '1':
        result = result + 1
    if str[1] == '1':
        result = result + 1
    if str[2] == '1':
        result = result + 1

    return result


if __name__ == "__main__":
    result = 0
    result = solver(input())
    print(result)

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 = str(input())
c = s.count('1')
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[ s1, s2, s3 ] = str( input() )
print( int( s1 ) + int( s2 ) + int( s3 ) )

Submission status: Accepted

Solution code:
if __name__=="__main__":
  a=input()
  print(a.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sample=input()
one_count=0
s=0
for i in sample:
  if sample[s] == "1":
    one_count+=1
    s+=1
  else:
    s+=1  
    
print(one_count)

Submission status: Accepted

Solution code:

str_list = input()

cnt = 0

for str in str_list:
    if str == '1':
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input()
counter = 0
li = list(num)
if li[0] == "1":
    counter += 1
if li[1] == "1":
    counter += 1
if li[2] == "1":
    counter += 1
print(counter)

Submission status: Accepted

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

if a == 1:
    count+=1

if b == 1:
    count+=1

if c == 1:
    count+=1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = input()
s = map(int,[s[0], s[1], s[2]]) #入力文字列を分割して配列に格納したあとintに変換
bedama = 0
for masu in s:
  if masu == 1:
    bedama += 1
print(bedama)

Submission status: Accepted

Solution code:
# Problem
# Python 2nd Try


def solver(marble):
    result = 0
    n = marble
    while 0 < n:
        scaleNo = n % 10
        result = result + scaleNo
        n = n // 10
    return result


if __name__ == "__main__":
    answer = 0
    answer = solver(int(input()))
    print(answer)

Submission status: Accepted

Solution code:
S = input()

ans = 0;

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

print(s.count('1'))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, heapq, collections, bisect, string
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**7)
inf = float('inf')
mod = 10**9+7
ans = inf ;count = 0 ;pro = 1

S=input()
C=collections.Counter(S)
print(C["1"])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def solve(s: str):
    print(s.count("1"))


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    s = input()
    solve(str(s))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#coding:utf-8
bits = input()
cnt = 0
for bit in bits:
  cnt += int(bit)
  
  
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

sum = 0
for i in s:
    if i == '1':
        sum = sum + 1

print(sum)

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 = str(input())
ans = s.count('1')
print(ans)

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

Submission status: Accepted

Solution code:
# Problem https://atcoder.jp/contests/abc081/tasks/abc081_a
# Python 1st Try


def onecounter(input_square):
    result = 0
    if input_square[0] == '1':
        result = result + 1
    if input_square[1] == '1':
        result = result + 1
    if input_square[2] == '1':
        result = result + 1
    return result


if __name__ == "__main__":
    answer = onecounter(input())
    print(answer)
exit

Submission status: Accepted

Solution code:
s=input()
result=0

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

Submission status: Accepted

Solution code:
S = str(input())

count = 0
for i in range(3):
    if S[i] == "1":
        count += 1
    else:
        pass
    
print(count)

Submission status: Accepted

Solution code:
s = list(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 range(len(s)):
    if s[i] == '1':
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
str_numbers = str(input())

result = 0

for str_num in str_numbers:
    if str_num == '1':
        result+=1

print(result)

Submission status: Accepted

Solution code:
MarbleList = list(input())

num=MarbleList.count('1')
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

n = list(input())

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

print(cnt)

Submission status: Accepted

Solution code:
input = input()
count = 0

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
values = list(map(int, input()))
cnt = 0
for value in values:
  if value == 1:
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
sl = list(input())

print(sl.count("1"))

Submission status: Accepted

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

print(s1+s2+s3)

Submission status: Accepted

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

if int(n/100) == 1:
    s += 1
if n%100 >= 10:
    s += 1
if n%10 == 1:
    s += 1

print(s)

Submission status: Accepted

Solution code:
str = input().split()
print(str[0].count("1"))

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

import numpy
import scipy

s = input()

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

Submission status: Accepted

Solution code:

s=list(input().split())
total=0

for digit in str(s):
 if digit=='1':
        total += 1

print(total)

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 = list(input())
for i in range(3):
    s[i] = int(s[i])
print(sum(s))

Submission status: Accepted

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