n = input() s = n.split() c = int(s[0]) * int(s[1]) print(c % 1000000007)