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