import sys

# 숫자의 합
def sum_digits(number):
    digit = [int(x) for x in str(number)]
    result = sum(digit)

    return result

# main
if __name__ == '__main__':
    N = int(sys.stdin.readline().rstrip()) # 숫자의 개수
    number = int(sys.stdin.readline().rstrip())
    answer = sum_digits(number)

    print(answer)
e890e13019c4038d8777a8bc8a876fd07ca8ec0d
<mask token>

<mask token>


def sum_digits(number):
    digit = [int(x) for x in str(number)]
    result = sum(digit)
    return result


<mask token>

<mask token>


def sum_digits(number):
    digit = [int(x) for x in str(number)]
    result = sum(digit)
    return result


if __name__ == '__main__':
    N = int(sys.stdin.readline().rstrip())
    number = int(sys.stdin.readline().rstrip())
    answer = sum_digits(number)
    print(answer)

import sys


def sum_digits(number):
    digit = [int(x) for x in str(number)]
    result = sum(digit)
    return result


if __name__ == '__main__':
    N = int(sys.stdin.readline().rstrip())
    number = int(sys.stdin.readline().rstrip())
    answer = sum_digits(number)
    print(answer)

import sys

# 숫자의 합
def sum_digits(number):
    digit = [int(x) for x in str(number)]
    result = sum(digit)

    return result

# main
if __name__ == '__main__':
    N = int(sys.stdin.readline().rstrip()) # 숫자의 개수
    number = int(sys.stdin.readline().rstrip())
    answer = sum_digits(number)

    print(answer)