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