MOD = 1000000007 A,B = map(int,input().split()) answer = (A * B) % MOD print(answer)