#include <stdio.h>
#include <math.h>
#include <string.h>
int main()
{
char a[10000] = {0}, b[10000] = {0}, * p = a, * q = b;
long long x = 0, y = 0,c = 0,d = 0,m,n;
gets_s(a);
gets_s(b);
x = strlen(a);
y = strlen(b);
m = x; n = y;
for (long long i = 0; i < x; ++i) {
c += pow(10, m - 1)*(a[i] - '0');
--m;
}
for (long long j = 0; j < y; ++j) {
d += pow(10, n - 1)*(b[j] - '0');
--n;
}
printf("%lld",c*d);
return 0;
}