https://www.acmicpc.net/problem/11720
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
String digit = br.readLine();
char[] arr = digit.toCharArray();
int sum = 0;
for(int i=0; i<N;i++){
sum += arr[i] - '0' ;
}
System.out.println(sum);
}
}