#include<iostream> using namespace std; int arr[1000], brr[1000], crr[2000]; void BigNumber(int n, int m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { crr[i+j] += arr[i]*arr[j]; } } for (int i = 0; i < m+n+3; i++) { if (crr[i] > 9) { crr[i+1] += crr[i]/10; crr[i] = crr[i]%10; } } int i= m+n+2; while (i> 0 && crr[i--]==0); int k; for (k = i+1; k >= 0; k--) { printf("%d", crr[k]); } } int main() { string str1, str2; while (cin>>str1>>str2) { for (int i = str1.length()-1, j = 0; i >= 0; i--, j++) { arr[j] = str1[i] - '0'; } for (int i = str2.length()-1, j = 0; i >= 0; i--, j++) { brr[j] = str2[i] - '0'; } BigNumber(str1.length(), str2.length()); } }