import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Baek11720 {

	public static void main(String[] args) throws IOException {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());
		int sum = 0;
		
		String s = br.readLine();
		
		if(s.length()==n) {
			for(int i =0; i<s.length(); i++) {
				sum += s.charAt(i)-'0'; //charAt예시
				
			}
			System.out.println(sum);
		}

	}

}
int[] arr; // -1 로 초기화 된 배열
 
String S = in.nextLine();
 
for(int i = 0; i < S.length(); i++){
	char ch = S.charAt(i);
    
	arr[ch - 'a'] = i;
}
System.out.println((char)(i + 65));   //i는 알파벳의 위치값
StringBuilder sb = new StringBuilder();
		
		sb.append("나는" + " ");
		sb.append("정수");

		System.out.println(sb);

출력 -> 나는 정수

append안에 다 모아서 한번에 출력