#include typedef long long i64; using std::cout; using std::endl; using std::cin; int main() { i64 a, b; scanf("%lld %lld", &a, &b); printf("%d\n", a * b % (int)(1e9 + 7)); return 0; }