import java.io.BufferedReader; import java.io.InputStreamReader; public class No220_2 { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader( System.in)); int N = Integer.parseInt(br.readLine()); // 10^n-1-(2/3)×9^n long ans = (long) (Math.pow(10, N) - 1 - (2 / 3.0) * Math.pow(9, N)); System.out.println(ans); } catch (Exception e) { System.err.println("Error:" + e.getMessage()); } } }