let AB = readLine()!.split(separator: " ").map{Int($0)!} print(AB[0] * AB[1] % 1000000007)