#include using namespace std; int main(){ long long A, B, modedA, modedB, ans, modedAns; scanf("%lld%lld",&A,&B); modedA = A % 1000000007; modedB = B % 1000000007; ans = modedA * modedB; modedAns = ans % 1000000007; printf("%lld\n",modedAns); return 0; }