#include #define mod 1000000007 using namespace std; long countArray(int n, int k, int x) { // Return the number of ways to fill in the array. long sum=0; long temp=k-1; return ((temp%mod*(temp+1)%mod)%mod)/2; } int main() { int n; int k; int x; cin >> n >> k >> x; long answer = countArray(n, k, x); cout << answer << endl; return 0; }