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 list(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, eval(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()

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 list(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:]





def li_input():

    return [int(_) for _ in input().split()]





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



dp = None





def main():

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





main()

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 list(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, eval(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()

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 list(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:]


def li_input():
    return [int(_) for _ in input().split()]


# --------------------------------------------
dp = None


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


main()

-# Set 2 dimension list -def dim2input(N): -    li = [] -    for _ in range(N): -        li.append(list(map(int, eval(input())))) -    return li +def li_input(): +    return [int(_) for _ in input().split()] -""" input template -S = input() -N = int(input()) -L = list(map(int, input().split())) -a, b = list(map(int, input().split())) -SL = list(input()) -"""