import java.util.Scanner;
public class Main02 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String[] s = scanner.nextLine().split(" ");
char[] x = s[0].toCharArray();
char[] y = s[1].toCharArray();
int sum=0;
for (char x1 : x) {
for (char y1 : y) {
sum += (x1-'0') * (y1-'0');
}
}
System.out.println(sum);
}
} import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
while (reader.hasNext()) {
int a = reader.nextInt();
int b = reader.nextInt();
ArrayList<Integer> arr = new ArrayList<>();
int sum = 0;
while (a > 0) {
arr.add(a%10);
a = a / 10;
}
while (b > 0) {
for (int i = 0; i < arr.size(); ++i) {
sum += (b % 10 * arr.get(i));
}
b /= 10;
}
System.out.println(sum);
}
}
}