A,B = map(int,input().split()) C = A*B D = C%1000000007 print(D)