#include int main(){ int x,y; scanf("%d %d",&x,&y); printf("%d\n",(x*y)%1000000007); }