package Test;
//例 判断和为10的两个数 3 7 是否为素数;
import java.util.Scanner;
public class sushutest2{
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
int n = sc.nextInt();
boolean flag = false;
int count = 0;
for(int i=2;i<=n/2;i++){
boolean a = f(i);
if(a){
boolean b = f(n-i);
if(b){
count++;
}
}
}
System.out.println(count);
}
public static boolean f(int n){
for(int i=2;i<n;i++){
if(n%i==0){
return false;
}
}
return true;
}
}
//例 判断和为10的两个数 3 7 是否为素数;
import java.util.Scanner;
public class sushutest2{
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
int n = sc.nextInt();
boolean flag = false;
int count = 0;
for(int i=2;i<=n/2;i++){
boolean a = f(i);
if(a){
boolean b = f(n-i);
if(b){
count++;
}
}
}
System.out.println(count);
}
public static boolean f(int n){
for(int i=2;i<n;i++){
if(n%i==0){
return false;
}
}
return true;
}
}