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