import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
//摇骰子的次数
int n = sc.nextInt();
//我们期望的数
long k = 1000000007;
int count = 0;
//找到n次投掷后的最大数
long max = 0;
for(int i = n;i >= 1;i--){
max += 6*Math.pow(10,i-1);
}
while(max >= k){
if(max%k==0){
count++;
max--;
}
max--;
}
System.out.println(count);
}
}