n-k(n-e+(n-k+e)(q  -2))