public int calculateState(int n) {
		if (dp[n] != 0)
			return dp[n];
		for (int i = 2; i < n; i++) {
			if (n % i == 0) {
				if (calculateState(n - i) == -1) {
					dp[n] = 1;
					break;
				}
			}
		}
		if (dp[n] == 0)
			dp[n] = -1;
		return dp[n];
	}