#include using namespace std; typedef long long int ll; #define rep(i, n) for (int i = 0; i < (n); i++) int mod = 1000000007; int main () { cin.tie(0); ios::sync_with_stdio(false); ll a, b; cin >> a >> b; cout << ((a%mod)*(b%mod))%mod << endl; return 0; }