long n;main(){n=scanf("%d",&n)>printf("%ld",(((((15*++n+98)*n+210)*n+140)*n*n+77)*n+90)*n/630);}