import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # ? MOD = 1000000007 a,b = map(int,read().split()) answer = a * b % MOD print(answer)