import java.io.BufferedReader;
import java.io.InputStreamReader;
class Solution {
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
int[][] arr = new int[10][N + 1];
for (int i = 1; i <= 9; i++) {
arr[i][1] = 1;
}
for (int j = 2; j <= N; j++) {
for (int i = 0; i <= 9; i++) {
if (i == 0) {
arr[i][j] = arr[1][j - 1];
} else if (i == 9) {
arr[i][j] = arr[8][j - 1];
} else {
arr[i][j] = (arr[i - 1][j - 1] + arr[i + 1][j - 1]) % 1000000000;
}
}
}
int ans = 0;
for (int i = 0; i <= 9; i++) {
ans = (ans + arr[i][N])% 1000000000;
}
System.out.println(ans);
}
}