import java.util.*;
public class Main {
public static boolean cbnum(long n) {
if (n == 2 || n == 3 || n == 5 || n == 7 || n == 11 || n == 13 || n == 17 || n == 19 || n == 23 || n == 29) {
return true;
}
if (n > 29 && (n % 2 != 0 || n % 3 != 0 || n % 5 != 0 || n % 7 != 0 || n % 11 != 0 || n % 13 != 0 || n % 17 != 0
|| n % 19 != 0 || n % 23 != 0 || n % 29 != 0)) {
return true;
}
return false;
}
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
scn.nextLine();
String s = scn.nextLine();
int start = 0, end = 1, count = 0;
while (start < s.length()) {
while (end <= s.length()) {
long val = Long.parseLong(s.substring(start, end));
if (cbnum(val)) {
count++;
start = end;
break;
} else {
end++;
}
}
start++;
end = start + 1;
}
System.out.println(count);
}
}
some of the testcases going wrong plz correct the code where i went wrong