#include <iostream> using namespace std; int main(){ long int A,B; cin>>A; cin>>B; cout<<A*B%1000000007<<endl; return 0; }