#include<iostream> #include<algorithm> #include <vector> #include<cmath> using namespace std; typedef long long int lont; int main() { lont A, B; cin >> A >> B; cout << ((A % 1000000007) * (B % 1000000007))%1000000007 << endl; }