main(){long long n;scanf("%lld",&n);printf("%lld\n",n<3?n:n*5-12);}