import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main implements Runnable { public static void main(String[] args) { new Main().run(); } long MOD = (long) (1e9 + 7); public void run() { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); System.out.println(A * B % MOD); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }