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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(6):
  ans += N % 10
  ans //= 10

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7
#main code here!
    s=SI()
    ans=0
    for i in range(6):
        if s[i]==1:
            ans+=1
    print(ans)        
    

        
        
        
        
    
if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print(input())

Submission status: Wrong Answer

Solution code:
l = max(list(map(int, input())))

print(l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
111100

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
for k in range(1,3501):
    for j in range(1,k+2):
        a=(4*j*k - n*k- n*j)
        if a<=0 : continue
        i = n*j*k / a
        i2= n*j*k // a
        if i==i2 :
            print(i2,j,k)
            break
    else:
        continue
    break

Submission status: Wrong Answer

Solution code:
N=int(input())
for n in range(1,3501):
    for w in range(1,3501):
        if n*(4*w-N)-N*w==0:
            continue
        if N*n*w % (n*(4*w-N)-N*w) ==0:
            h= (N*n*w) // (n*(4*w-N)-N*w)
            if h>=1:
                print(h,n,w)
                exit()

Submission status: Wrong Answer

Solution code:
import sys
N=int(input())
for h in range(1,3501):
    for n in range(h,3501):
        if 4*n*h-N*h-N*n >0:
            if (N*h*n)%(4*n*h-N*h-N*n)==0:
                w=int((N*h*n)/(4*n*h-N*h-N*n))
                print(h,n,w)
                sys.exit()

Submission status: Wrong Answer

Solution code:
a =input() 
c=0
for i in range(0,6):
 if a[i] == 1:
  c += 1
 else:
  pass
print(c)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
for i in range(1, 3501):
    for j in range(i, 3501):
        if 4*i*j - n*i - n*j == 0: continue
        k = n*i*j // (4*i*j - n*i - n*j)
        if k < 1: continue
        if 4*i*j*k == n*(i*j + j*k + k*i):
            print("{0} {1} {2}".format(i, j, int(k)))
            sys.exit(0)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
for i in range(1, 3501):
    for j in range(i, 3501):
        if 4*i*j - n*i - n*j == 0: continue
        k = n*i*j / (4*i*j - n*i - n*j)
        if k < 1: continue
        if 4*i*j*k == n*(i*j + j*k + k*i):
            print("{0} {1} {2}".format(i, j, int(k)))
            sys.exit(0)

Submission status: Wrong Answer

Solution code:
import sys
N=int(input())
if N%4==0:
    print(int(3*N/4),int(3*N/4),int(3*N/4))
else:
    for h in range(1,3501):
        for n in range(1,3501):
            for w in range(1,3501):
                if N*(h*n+n*w+w*h)==4*h*n*w:
                    print(h,n,w)
                    sys.exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = map(int, input().split())
a = list(a)

ans = 0
for i in a:
    ans += i
print(ans)

Submission status: Wrong Answer

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

print(inputs.count('1'))

Submission status: Wrong Answer

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
ans = Counter(input())['1']
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()


 
print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def pcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c
    
print(pcnt(int(input(),2)))

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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7
#main code here!
    s=SI()
    ans=0
    for i in range(6):
        if s[i]=="1":
            ans+=1
    print(ans)        
    

        
        
        
        
    
if __name__=="__main__":
    main()

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
x = 0
for i in range(6):
    x += int(s[i])

print(x)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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


def main():
    S = input()

    print(S.count("1"))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし


print(sum(LI2()))

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:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  S=pin()[:-1]
  print(S.count("1"))
  return 

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#Tenka1 Programmer Beginner Contest a
s=input()
print(s.count('1'))

Submission status: Accepted

Solution code:
import sys

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


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    S = SS()

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

if __name__ == '__main__':
    resolve()

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

Submission status: Accepted

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

Submission status: Accepted

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

print(c)

Submission status: Accepted

Solution code:
# coding: utf-8

#N = int(input())
L = []
p1 = 0
p2 = float('inf')
r1 = float('inf')
r2 = 0
S = list(input())
#print(S)
ans = 0
for s in S:
    if s == "1":
        ans += 1
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()
    ans = S.count("1")
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math, cmath
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import _heapify_max, _heappop_max, _siftdown_max
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    Num = Union[int, float]
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    # def _heappush_max(h, item): h.append(item); _siftdown_max(h, 0, len(h)-1)
    
    
    s = input()
    print(s.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:
a = int(input())
count = 0
while a != 0:
    rem = a % 10
    if rem == 1:
        count += 1
    a //= 10
print(count)

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 accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
s = input()

print(s.count('1'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

def main():
    mod=10**9+7
    s=input()
    print(s.count("1"))

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

print(s.count("1"))

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

print(s.count('1'))

Submission status: Accepted

Solution code:
def main():
    s = list(map(int, list(input())))
    print(sum(s))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

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

Submission status: Accepted

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

Submission status: Accepted

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
print(Counter(S())["1"])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
print(S.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([ int(i) for i in s ]))

Submission status: Accepted

Solution code:
s = list(input())
a = 0
for n in s:
  a += int(n)
print(a)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    str = (input().rstrip())
    print(str.count("1"))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
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()
count =  0
for i in S:
  if i == '1':
    count+=1
print(count)

Submission status: Accepted

Solution code:
a = input()
l = []
for i in str(a):
    if i == '1':
        l.append(i)
print(len(l))

Submission status: Accepted

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

155284

Submission status: Accepted

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

  print(S.count('1'))

if __name__ == "__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
c = Counter(S)
print(c["1"])
# print(c)

Submission status: Accepted

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

print(sum(S))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    s = input()
    s = [int(c) for c in s]
    print(s.count(1))



resolve()

Submission status: Accepted

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

print(l)

Submission status: Accepted

Solution code:
from sys import stdin
S = stdin.readline().rstrip()
print(S.count('1'))

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

Solution code:
s = input() #sys.stdin.readlineは最後が改行
ans = s.count('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 s:
  ans += 1 if i == '1' else 0
  
print(ans)

Submission status: Accepted

Solution code:
S = input()

print(S.count('1'))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    s=input()
    ans=0
    for ss in s:
        if ss=='1':ans+=1
    print(ans)

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=list(str(input()))
t=0
c=0
for i in range(6):
  t=s.pop()
  if t=='1':
    c+=1
print(c)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    s = input()
    count =0
    
    for i in range(6):
        if "1" == s[i]:
            count+=1
    print(count)

Submission status: Accepted

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