a,b = map(int,input().split(" ")) c = (a*b)%1000000007 print(c)