public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder out = new StringBuilder();
		String line;
		fillFibo(1501);
		BigInteger ONE = BigInteger.ONE;
		BigInteger TWO = new BigInteger("2");
		int nCase = 1;
		while ((line = in.readLine()) != null) {
			int n = Integer.parseInt(line.trim());
			if (n == 0)
				break;
			if (n-- == 1)
				out.append("Set " + nCase++ + ":\n0\n");
			else {
				BigInteger x = (sum[n].add(sum[n - 1]).subtract(ONE)).divide(TWO);
				out.append("Set " + nCase++ + ":\n" + x + "\n");
			}
		}
		System.out.print(out);
	}