#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from collections import deque import heapq from collections import Counter import math # ------------------------------------------------------ class IN: @staticmethod def singleInt(): return int(input()) @staticmethod def singleStr(): return input() @staticmethod def listInt(): return list(map(int, input().split())) @staticmethod def listStr(): return input().split() # ------------------------------------------------------ print = lambda s: sys.stdout.write(str(s) + "\r\n") def contain(c, x): return (x in c) def str_reverse(s): return s[::-1] def ctoi(c): return int.from_bytes(c.encode(), byteorder='big') def itoc(x): return x.to_bytes((x.bit_length() + 7) // 8, byteorder='big').decode() INF = 1001001001001001001 # ------------------------------------------------------ MOD = 1000000007 if __name__ == '__main__': A, B = IN.listInt() print(A * B % MOD)