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