#include #include #include #include #define ll long long using namespace std; int B[11]; int main(){ ll a,b; cin>>a>>b; cout<<(a*b)%1000000007<