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