int quasifactorial(int n) { int res = 1; for (int i = 2; i <= n; i++) { res = res * i - 1; } return res; }