import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		int[][] arr = new int[1001][10];
		Arrays.fill(arr[0] , 1);
		for (int i = 1; i <= 1000; i++) {
			for (int j = 9; j >= 0; j--) {
				if (j == 9) {
					arr[i][j] = 1;
				} else {
					arr[i][j] = (arr[i-1][j] + arr[i][j+1]) %10007;
				}
			}
		}
		
		System.out.print(arr[N][0]);
	}
}

