public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line;
		while ((line = in.readLine()) != null) {
			int n = Integer.parseInt(line.trim());
			if (n == 0)
				break;
			p = new Point[n];
			for (int i = 0; i < n; i++) {
				long[] xy = readLongs(in.readLine());
				p[i] = new Point(xy[0], xy[1]);
			}
			double total = 0;
			for (int i = 0; i < n; i++)
				total += turn(p[i], p[(i + 1) % n], p[(i + 2) % n]);
			out.append(String.format("%.0f\n", total / (Math.PI * 2)));
		}
		System.out.print(out);
	}