import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int first = scanner.nextInt(); int second = scanner.nextInt(); int sum = 0; for(int index = first; index <= second; index++){ if(check(index)){ sum += index; } } System.out.print(sum); } private static boolean check(int num){ if (num < 2) return false; for (int index = 2; index <= num / index; index++ ) { if (num % index == 0) { return false; } } return true; } }