import strutils, sequtils var a = readLine(stdin).split.map(parseInt) ab = a[0] * a[1] if ab > 1000000007: echo ab div 1000000007 else: echo ab