#include <iostream>
using namespace std;
typedef long long ll;

void func(ll a, ll b) {
    ll x = a, y = b;
    int len1 = 0, len2 = 0;
    while (x) {
        len1++;
        x /= 10;
    }
    while (y) {
        len2++;
        y /= 10;
    }
    x = a;
    ll res = 0;
    for (int i = 0; i < len1; i++) {
        y = b;
        for (int j = 0; j < len2; j++) {
            int temp = (x % 10) * (y % 10);
            res += temp;
            //cout<<"temp="<<temp<<",res="<<res<<endl;
            y /= 10;
        }
        x /= 10;
    }
    cout << res << endl;
}

int main() {
    ll a, b;
    while (cin >> a >> b) {
        func(a,  b);
    }
}
// 64 位输出请用 printf("%lld")