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