import java.util.*; public class Main { static final int MOD = 1000000007; public static void main (String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextInt(); long b = sc.nextInt(); System.out.println(a * b % MOD); } }