#include int main(void){ long long int A,B; scanf("%d %d",&A,&B); printf("%11d\n",(A*B)%1000000007); return 0; }