a,b = map(int,input().split()) a *= b a %= (10**9 + 7) print(a)