n;long p(a,b){return b?1L*a*p(a,b-1):1;}main(){n=scanf("%d",&n)>printf("%ld",p(10,n)-p(9,n)/3*2-1);}