As every n-2 attributes of relation R form a candidate key it implies that every n-1 attributes will also be a super key(because it contains the n-2 attributes that form a candidate key previously)
so total number of super keys:
as every candidate key is a super key :
$\binom{n}{n-2}$ candidate keys will be there.
taking all possible combinations of 'n-1' attributes together they will also form a super key:
$\binom{n}{n-1}$
taking all possible combinations of 'n' attributes together :
$\binom{n}{n}$ (which will be the complete attribute set)
so final answer would be:
$\binom{n}{n-2}$+$\binom{n}{n-1}$ +$\binom{n}{n}$=$\frac{n^{2}+n+2}{2}$