#include using namespace std; bool prime(int n) { if (n == 2)return true; if (n % 2 == 0 || n < 2)return false; for (int c = 3; c * c <= n; c += 2) if (n % c == 0)return false; return true; } int solve(int n) { int tot = 0; int p = n >> 1; if (p % 2 == 0)--p; for (; p >= 3; p -= 2) if (prime(p) && prime(n - p)) { ++tot; } return tot; } int main() { for (int n; cin >> n;) cout << solve(n) << endl; return 0; }