import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigDecimal; public class No00000666_Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String[] s = br.readLine().split(" "); BigDecimal a = new BigDecimal(s[0]); BigDecimal b = new BigDecimal(s[1]); BigDecimal ans = a.multiply(b).remainder(new BigDecimal("1000000007")); System.out.println(ans.toPlainString()); } }