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