#include int main(){ long long int a,b; scanf("%lld%lld",&a,&b); a=a%1000000007; b=b%1000000007; a=(a*b)%1000000007; printf("%d",a); return 0; }