program A081
    implicit none
    character(3) :: s
    integer(4) :: i, sum

    read(5,*) s
    sum = 0
    do i = 1, 3
        if (s(i:i) == "1") then
            sum = sum + 1
        end if
    



    end do

    write(6,*) sum


end program A081