($N,$S,$K)=glob<>; $S-=$N*~-$N/2*$K; @b=1; for$i(1..$N){ ($b[$_]+=$b[$_-$i])%=1e9+7for$i..$S } print$b[$S]+0