Problem:


Score : 100 points

Problem Statement

Snuke prepared 6 problems for a upcoming programming contest.
For each of those problems, Rng judged whether it can be used in the contest or not.

You are given a string S of length 6.
If the i-th character of s is 1, it means that the i-th problem prepared by Snuke is accepted to be used; 0 means that the problem is not accepted.

How many problems prepared by Snuke are accepted to be used in the contest?

Constraints

The length of S is 6.

S consists of 0 and 1.

Inputs

Input is given from Standard Input in the following format:

S

Outputs

Print the number of problems prepared by Snuke that are accepted to be used in the contest.

Sample Input 1

111100

Sample Output 1

4

The first, second, third and fourth problems are accepted, for a total of four.

Sample Input 2

001001

Sample Output 2

2

Sample Input 3

000000

Sample Output 3

0



Sample input:
111100


Sample output:
4

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

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


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
s = input()

print(s.count("1"))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
S = input()

print(S.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input().rstrip()
    ans = 0
    for c in s:
        if c == "1":
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=int(input())
count=0
for i in range(len(str(s))):
    if s%10==1:
        count+=1
    s=s//10
print(count)

Submission status: Accepted

Solution code:
import math
import itertools
#n = int(input())
#n, d = list(input().split())
#n, l = list(map(int, input().split()))
n = input()
count = 0
for i in range(len(n)):
    if n[i]=='1':
        count += 1

print(count)

Submission status: Accepted

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

mod = int(1e9+7)

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

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
s = input()
print(s.count("1"))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

ans = 0

for ss in s:
    ans += int(ss)
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:
s=input()

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

print(c)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
#N = int(input())
S = str(input())

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

print (cnt)

Submission status: Accepted

Solution code:
s = input()
ct = 0

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

print(ct)

Submission status: Accepted

Solution code:
def main(s):
    ans = 0

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

    print(ans)


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

    main(s)

Submission status: Accepted

Solution code:
def main():
    ls = list(input())
    ans = 0
    for i in range(len(ls)):
        if ls[i]=="1":
            ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().rstrip()

print(s.count("1"))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    print(ST().count("1"))
if __name__ == '__main__':
    main()

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

S = list(input())

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

print(ans)

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

Submission status: Accepted

Solution code:

s = input()

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

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

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

Submission status: Accepted

Solution code:
S = input()
ans = 0

for i in S:
  ans += int(i)
print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Accepted...?
S = input()
n = 0
for i in range(6):
    if S[i] == "1":
        n += 1
print(n)

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    print(s.count("1"))


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = str(input())

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

Submission status: Accepted

Solution code:
# Tenka1 Programmer Beginner Contest 2017: A – Accepted...?
s = input()
print(s.count('1'))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(S: str):
    print(S.count('1'))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = str(next(tokens))  # type: int
    solve(S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = str(input())

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

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

print(s.count("1"))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    print(s.count("1"))


if __name__ == '__main__':
    slove()

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 = raw_input()
count = 0
for i in n:
    if(i=='1'):count+=1;

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
ans=0
for _ in range(6):
  if s[_]=='1':
    ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    print(str(input().rstrip('\n')).count("1"))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
def main():

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

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

Submission status: Accepted

Solution code:
a = list(input())

print(a.count('1'))

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

Submission status: Accepted

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

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:
# coding: utf-8
# Your code here!

S = input()

# print(S)

score = 0

for i in range(len(S)):
    # print(0)
    if S[i] == '1':
        score += 1
        
print(score)

Submission status: Accepted

Solution code:
def solve(s):
    return s.count("1")

print(solve(input()))

Submission status: Accepted

Solution code:
# 2019/08/22

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

Submission status: Accepted

Solution code:
S = input()

print(S.count("1"))

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()
sli = list(S)
c = 0
for i in range(len(S)):
    if sli[i] == "1":
        c += 1 
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# tenka1-2017-beginnerA - Accepted...?
def main():
    s = input()
    print(s.count("1"))


if __name__ == "__main__":
    main()

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:
b,*a='_'+input();print(sum(map(int,a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(sum(1 for i in input() if i=="1"))

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

S = sys.stdin.readline().rstrip()
print(S.count('1'))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
###template###
import sys
input = sys.stdin.readline
def mi(): return map(int, input().split())
###template###

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

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().rstrip()
print(S.count('1'))

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

print(ans)

Submission status: Accepted

Solution code:
s = input()
l = [int(x) for x in list(str(s))]
count = 0
for i in l:
    if i == 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:
S = input()
flag = 0
for i in range(len(S)):
 if S[i] == "1":
  flag += 1
print(flag)

Submission status: Accepted

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

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:
#!/usr/bin/env python3

S = str(input())

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

print(total)

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

cnt = 0

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

print(cnt)

Submission status: Accepted

Solution code:
a = input()
print(a.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(6):
  if s[i]=='1':
    count+=1
print(count)

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
import collections
from operator import itemgetter
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
#n = ip()                                     #入力整数1つ
#n,q= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
b = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
#こっから本文
a = []
for i in range(len(b)):
    a.append(b[i])
p  = 0
for i in range(len(a)):
    if a[i] == '1':
        p+=1
print(p)

Submission status: Accepted

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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S=input()

print(S.count('1'))

Submission status: Accepted

Solution code:
Ss = input()

print(Ss.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = S.count("1")

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
str_li = list(str)
count = 0
for str_one in str_li:
    if int( str_one ) == 1:
        count = count+1

print(count)

Submission status: Accepted

Solution code:
S = int(input())

lst = []
while S > 0:
    lst.append(S%10)
    S //= 10 # 必須
lst.reverse()

print(sum(lst))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
count=0
for i in range(6):
    if N[i] == str(1):
        count=count+1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input().strip('\n'))
s = sum([int(x) for x in s])
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
c=0
for i in range(6):
    c+=n%10
    n=n//10
print(c)

Submission status: Accepted

Solution code:
S = input()
accepted = 0
for i in range(6):
        if S[i] == "1":
                accepted +=1
print (accepted)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = raw_input()
S = 6
count = 0
for _ in range(S):
    if str(i[_]) == '1':
        count += 1
print(count)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

ans = S.count('1')
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
L = []
for k in range(len(S)):
  L.append(int(S[k]))
print(sum(L))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# Tenka1 Programmer Beginner Contest
# Problem A

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

    print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s, ans = raw_input(), 0
for c in s:
    if c is '1':
        ans += 1
print ans

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(map(int, list(raw_input())))

Submission status: Accepted

Solution code:
s=input()
if '1' in s:
  print(s.count('1'))
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ESC ESC ESC  <-  ???
# C-g (many times if needed)

# C-x h  and  C-x C-x  <-  selection
# M-;  M- means option key  <- comment out

# C-h k  <-  help for key
# C-x 1  <-  close other windows

# def main():
#     print("Hello, world")

# if __name__ == "__main__":
#     main()
# 
# aaaa


# aaaa
# aaa


import sys


def main():
    input_snuke = input()
    ret = snuke(input_snuke)
    print(ret)
    print("Hello, world.", file=sys.stderr)

    return ret


def snuke(list_snuke):

    count_snuke = 0
    #list_snuke = input()
    for ch in list_snuke:
        if ch == '1':  # "1" is also available
            count_snuke += 1

    return count_snuke


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

s = arr_data[0][0]

mysum=0

for v in s:
    
    mysum+=int(v)
    
print(mysum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
s = list(str(input()))
print(s.count("1"))

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

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:
#!/usr/bin/env python3
S = list(input())
print(sum(map(int, S)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print (cnt)

Submission status: Accepted

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

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 main():
    s = S()
    r = 0
    for c in s:
        if c == '1':
            r += 1
    return r


print(main())

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
S = list(map(int, list(input())))
print(S.count(1))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    s = input()
    cnt = 0
    for c in s:
        if c == '1':
            cnt += 1
    print(cnt)
    return


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
S=input()
c=0

for i in range(len(S)):
    if int(S[i])==1:
        c+=1

print(c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=raw_input()
print bin(int(S,2)).count('1')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print raw_input().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:
s = raw_input()
l = list(filter(lambda x: x == '1',s))
print(len(l))