#include "cstdio"

using namespace std;

int handle(int num, int* arr) {
    int i = 0;
    while (0 != num) {
        int a = num % 10;
        arr[i++] = a;
        num /= 10;
    }
    return i;
}

int main() {
    int num1, num2;
    int arr1[11], arr2[11];
    scanf("%d %d", &num1, &num2);

    // 处理第一个数字
    int len1 = handle(num1, arr1);
    int len2 = handle(num2, arr2);

    int sum = 0;
    for (int i = 0; i < len1; ++i) {
        for (int j = 0; j < len2; ++j) {
            sum += arr1[i] * arr2[j];
        }
    }
    printf("%d", sum);
    return 0;
}