M=10**9+7 n,s,k=gets.split.map(&:to_i) s-=k*n*(n-1)/2 if s<0 p 0 exit end dp=Array.new(n+s+9,1) w=1 (n-1).times{ temp=Array.new(n+s+9,0) w+=1 (s+1).times{|i| temp[i]=(temp[i-w]+dp[i])%M } dp=temp } p dp[s]