main(){long int a,b;scanf("%ld%ld",&a,&b);printf("%ld\n",a*b%1000000007);}