import java.io.*;
import java.util.*;

public class victory_av {

	final String filename = new String("victory").toLowerCase();

	void solve() throws Exception {
		int n = nextInt();
		int need = n * (n - 1) / 2;
		if (need % 2 != 0) {
			out.println(0);
			return;
		}
		need /= 2;
		
		final long mod = 1000 * 1000 * 1000 + 7;
		long[] count = new long[need + 1];
		long[] newCount = new long[need + 1];
		count[0] = 1;
		long[] prefSum = new long[need + 2];
		for (int i = 1; i <= n; i++) {
			int curMax = Math.min(i * (i - 1) / 2, need);
			prefSum[0] = 0;
			for (int j = 0; j <= need; j++) {
				prefSum[j + 1] = prefSum[j] + count[j];
				if (prefSum[j + 1] > mod) {
					prefSum[j + 1] -= mod;
				}
			}
			
			for (int c = 0; c <= curMax; c++) {
				int right = c;
				int left = Math.max(0, c - (i - 1));
				newCount[c] = prefSum[right + 1] - prefSum[left];
				while (newCount[c] > mod) {
					newCount[c] -= mod;
				}
				while (newCount[c] < 0) {
					newCount[c] += mod;
				}
			}
			System.arraycopy(newCount, 0, count, 0, count.length);
		}
		out.println(count[need]);
	}

	void run() {
		try {
			in = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			//			in = new BufferedReader(new InputStreamReader(System.in));
			//			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;

	String nextToken() throws Exception {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws Exception {
		return Double.parseDouble(nextToken());
	}

	public static void main(String[] args) {
		new victory_av().run();
	}

}
