package BOJ._0119;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class BOJ_11057 {
static int[][] number;
static int mod = 10_007;
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
number = new int[n+1][10];
solve(n);
}
private static void solve(int n) {
number[1][0]=1;
number[1][1]=1;
number[1][2]=1;
number[1][3]=1;
number[1][4]=1;
number[1][5]=1;
number[1][6]=1;
number[1][7]=1;
number[1][8]=1;
number[1][9]=1;
for(int i=2; i<=n; i++){
for(int j=0; j<10; j++){
for(int k=j; k<10; k++){
number[i][j] += (number[i-1][k])%mod;
}
}
}
System.out.println((Arrays.stream(number[n]).sum())%mod);
}
}