A, B = [int(i) for i in input().strip().split()] print((A * B) % 1000000007)