#include "bits/stdc++.h" using namespace std; int main() { long long A,B; cin >> A >> B; cout << A*B % 1000000007 << endl; }