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:
# -*- coding: utf-8 -*-

number = raw_input()
count = 0
for i in number:
    if i == '1':
        count += 1
    elif i == '0':
        continue
    else :
        # print('Error Input: '+i)
        break

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    ans_list = list(str(input().split()))
    print(ans_list.count("1"))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
chars = list(input())

answer = chars.count("1")
print(answer)

Submission status: Accepted

Solution code:

s = list(input())

print(s.count("1"))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8


ip = input()

cnt = 0

if ip[0] == "1":
    cnt += 1

if ip[1] == "1":
    cnt += 1

if ip[2] == "1":
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = str(input())
print(a.count('1'))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':

    s = input()
    target = '1'
    count = 0

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

    print(count)

Submission status: Accepted

Solution code:
a = input()

c = a.count('1')

print(c)

Submission status: Accepted

Solution code:
input = str(input())
num = 0

for i in input:
  if i == "1":
    num += 1
    
print(num)

Submission status: Accepted

Solution code:
x = int(input())
ans = 0
if x//100==1:
    ans+=1
if x%100//10==1:
    ans+=1
if x%10//1 == 1:
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
s1 = s[0]
s2 = s[1]
s3 = s[2]
n = 0
if s1 == '1':
  n = n + 1
if s2 == '1':
  n = n + 1
if s3 == '1':
  n = n + 1
print (n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = list(input())

print(A.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()
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()

# for文で解く場合

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

print(counter_b)

Submission status: Accepted

Solution code:
s = input()

# 全探索で解く場合

counter_a = 0

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

Submission status: Accepted

Solution code:
s = input()
a = int(s[0])
b = int(s[1])
c = 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:
#A - Placing Marbles
#入力
s = list(input())

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

print(s1+s2+s3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = list(map(int, input()))
count = 0
for i in n: 
    if i == 1: count += 1
print(count)

Submission status: Accepted

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

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()
s1,s2,s3 = (int(i) for i in s)
print(s1+s2+s3)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s1,s2,s3=map(int,input())
counter=[s1,s2,s3]
print(counter.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:
# -*- coding: utf-8 -*-
s = map(int, list(input()))
r = 0
for i in s:
    r += i
print(r)

Submission status: Accepted

Solution code:
s_list = map(int, list(input()))
count = 0
for s in s_list:
    if s == 1:
        count += 1
    else:
        continue

print(count)

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

Submission status: Accepted

Solution code:
s = str(input())
t = list(s)
for i in range(len(t)):
  t[i] = int(t[i])
  
print(t.count(1))

Submission status: Accepted

Solution code:
count = 0

nums = input()
for num in nums:
    if(num=='1'):
        count = 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:
if __name__ == '__main__':

    s = input()
    target = '1'
    count = 0

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

    print(count)

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())
ss = s.split("1")
print(len(ss)-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()
cnt = 0

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

print cnt

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = int(input())
cnt = 0
for i in range(3):
    if S % 10 == 1:
        cnt += 1
    S = int(S / 10)
print(cnt)

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:
from collections import Counter


def main():
    s = input()
    counter = Counter(s)
    print(counter['1'])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

n = arr_data[0][0]

#print(n)

cnt=0
cnt+= 1 if n[0]=="1" else 0
cnt+= 1 if n[1]=="1" else 0
cnt+= 1 if n[2]=="1" else 0

print(cnt)

Submission status: Accepted

Solution code:
i = int(input())
counter = 0

if i/100 >= 1.0:
    counter += 1
    i -= 100
if i/10 >= 1.0:
    counter += 1
    i -= 10
if i == 1:
    counter += 1

print(counter)

Submission status: Accepted

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

s = input()
res = 0
for c in s:
    if c == "1":
        res += 1

print(res)

Submission status: Accepted

Solution code:
# input() はchar配列. count(x)は配列にxが何個あるかを数える
print(input().count('1'))

Submission status: Accepted

Solution code:
from collections import Counter

count = Counter(list(input()))

print(count['1'])

Submission status: Accepted

Solution code:
x = input()
if x =='000' :
     print(0)
if (x == '001' or x == '010' or x == '100'):
    print(1)
if (x == '011' or x == '110' or x == '101'):
    print(2)
if x == '111' :
    print(3)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
def main():
    input_char_list = list(input())
    count = 0
    for char in input_char_list:
        if char == '1':
            count += 1
    print(count)
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
def main():
    s = input()
    cnt = 0
    for c in s:
        if c == "1":
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

s = ns()
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:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

s = ns()
ans = 0
for i in s:
    if i == '1':
        ans += 1
    else:
        pass
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = str(input()).split("1")
print(len(a)-1)

Submission status: Accepted

Solution code:
num = 0

for x in input():
    if x == '1':
        num += 1

print(num)

Submission status: Accepted

Solution code:
print list(raw_input()).count('1')

Submission status: Accepted

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem A

if __name__ == '__main__':
    marble_count = sum(map(int ,list(str(input()))))
    print(marble_count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = list(input())

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

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 sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

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

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

# Set 2 dimension list
def dim2input(N):
    li = []
    for _ in range(N):
        li.append(list(map(int, input())))
    return li

""" input template
S = input()
N = int(input())
L = list(map(int, input().split()))
a, b = list(map(int, input().split()))
SL = list(input())
"""

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

dp = None

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

main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
s = input()
cnt = 0
for n in s:
    if n == "1":
        cnt += 1
print((cnt))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = int(input())
count = 0
s1 = int(S / 100)
S %= 100
s2 = int(S / 10)
S %= 10
s3 = S
if s1 == 1: count += 1
if s2 == 1: count += 1
if s3 == 1: count += 1
print(count)

Submission status: Accepted

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

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys

s = raw_input().split()[0]

n = 0
for c in s:
    if c == '1':
        n += 1

sys.stdout.write('%d\n' % n)
sys.stdout.flush()

Submission status: Accepted

Solution code:
a=list(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:
s = int(input())
a=int(s/100)
s-=100*a
b=int(s/10)
s-=10*b

print(a+b+s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc081/tasks/abc081_a

"""
import sys
from sys import stdin
input = stdin.readline


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


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())
if s==0:
    print('0')
elif s==10 or s==1 or s==100:
    print('1')
elif s==111:
    print('3')
else:
    print('2')

Submission status: Accepted

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



def main():
    S = input()

    ans = sum(c == "1" for c in S)
    print(ans)

if __name__ == "__main__": main()

Submission status: Accepted

Solution code:
S = input()
print(sum([1 if c == '1' else 0 for c in S]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print len(filter(lambda c: c=="1", raw_input()))

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

Submission status: Accepted

Solution code:
import numpy as np
import pdb

def main():
    string = np.array(list(raw_input()))
    num1 = len(np.where(string == '1')[0])
    print num1

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print({
  '000': 0,
  '001': 1,
  '010': 1,
  '011': 2,
  '100': 1,
  '101': 2,
  '110': 2,
  '111': 3
}[input()])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
ans = 0
for b in a:
    if int(b) == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s1,s2,s3= [int(i) for i in input()]
count = 0

if s1 == 1 :
    count+=1
if s2 == 1 :
    count+=1
if s3 == 1 :
    count+=1
print(count)

Submission status: Accepted

Solution code:
# A - Placing Marbles
# coding: utf-8

s1, s2 ,s3 = map(int, raw_input())
s = [s1, s2, s3]

print s.count(1)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:

print(sum(map(lambda s: s == '1', list(input()))))

Submission status: Accepted

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

for number in num:
    if number == '1':
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
number = int(input())

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

Submission status: Accepted

Solution code:
import sys

s = sys.stdin.readline()

ss = s.rstrip()

sss =str(ss)
if ss == '000':
    print(0)
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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
answer = 0

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

Submission status: Accepted

Solution code:
a=int(input())
b1=a // 100
b2=a % 100
c1=b2 // 10
c2=b2 % 10
print(b1+c1+c2)

Submission status: Accepted

Solution code:
s = input()

# sを分解して1の数をカウントする
print(s.count('1'))

Submission status: Accepted

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

print(b)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 20 11:35:39 2017

@author: kotania
"""

s = input()

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

Submission status: Accepted

Solution code:
s = input()

# sを分解して1の数をカウントする
print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = list(map(int, list(input())))
print(sum(s))

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def solve():
	s = input()
	ans = 0
	for i, c in enumerate(s):
		if c == "1":
			ans += 1
	print(ans)

solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
count = 0
if num >= 100:
    count += 1
if num % 100 >= 10:
    count += 1
if num % 10 == 1:
    count += 1

print(count)

Submission status: Accepted

Solution code:
stdin = input()
ans = 0
for char in stdin:
    if char == "1":
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s=input()

count=0

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

n = raw_input()

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

print count

Submission status: Accepted

Solution code:
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 14 22:14:39 2017

@author: Kanoh
"""

#Placing Marbles
input_line1 = raw_input()#標準入力
total=0
counter=0
for i in range(len(input_line1)):
    if(int(input_line1[i])==1):
        counter=counter+1
        
print counter

Submission status: Accepted

Solution code:
S = input()

def main():
    strlen1 = S.replace('0', '')
    result = len(strlen1)
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#ABC081a

s=raw_input()
res=0
for i in xrange(3):
 if s[i]=='1':
  res+=1
print res

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for x in N:
    if x == '1':
        a += 1

print(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=len([c for c in input().strip() if c =="1"])
print(n)

Submission status: Accepted

Solution code:
print(sum(c=='1' for c in input()))

Submission status: Accepted

Solution code:
# coding: utf-8

# 入力
s = [int(i) for i in input()]

# 出力
print(sum(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def M(n): return ModInt(n)
def MI(): return M(I())


def main():
    return collections.Counter(S())['1']



print(main())

Submission status: Accepted

Solution code:
F = raw_input()

print (len(F) - len(F.replace("1", "")))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()

ct = 0

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

print ct

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
from collections import Counter
s = list(input())
a = Counter(s)
print(a['1'])

Submission status: Accepted

Solution code:
s_input=input()
s = list(s_input)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = bin(int(input(),2)).count("1")
print(S)

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache, reduce
from operator import xor
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
inp = input()
inps = list(inp)
count = 0


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

print(count)

Submission status: Accepted

Solution code:
a,b,c=list(input())
cnt=0
if a=='1':
    cnt+=1
if b=='1':
    cnt+=1
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:
x = input()
ans= 0
for i in x:
    if i == '1':
        ans += 1
print(ans)

Submission status: Accepted

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)

if s.count("1") == 3:
	print(3)

Submission status: Accepted

Solution code:
# cook your dish here
s = input()
count=0
for c in s:
    if c=='1':
        count+=1
print(count)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

res = s.count("1")

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a= input()
ans = 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:
ans=0
S=input()
for s in S:
    if s=='1':
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
ss=list(str(input()))
r=0
for i in ss:
    r+=int(i)
print(r)

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:
t=list(raw_input())
count=0
for i in t:
    if i == "1":
        count+=1
print count

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h1=input()

if h1=='111':
	print(3)
elif h1=='000':
	print(0)
elif h1=='100' or h1=='010' or h1=='001':
	print(1)
else:
	print(2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

N=int(input())
cnt=0

for i in range(3):
    if N%10==1:
        cnt+=1
    N=int(N/10)
print(cnt)

Submission status: Accepted

Solution code:
i = input(); 
total = 0;
j = 0;
for j in range(0,3): 
  if i[j] == "1":
    total += 1
print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = input()
num_list = []
for i in range(0,3):
    if int(num[i]) == 1:
        num_list.append(i)
num_len = len(num_list)
print(num_len)

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
I=input()
I2=map(int, I)
X=sum(I2)
print(X)

Submission status: Accepted

Solution code:
R=input()
count=0

for _ in R:
    if _ =='1':
        count=count+1
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8

N = input()
N_list = list(N)
N_count = N_list.count("1")

if N_count == 0:
	print("0")
elif N_count == 1:
	print("1")
elif N_count == 2:
	print("2")
elif N_count == 3:
	print("3")