#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string a,b;
ll ans;
signed main()
{
cin>>a>>b;
for(ll i=0;i<a.size();i++)
{
for(ll j=0;j<b.size();j++)
{
ans+=ll(a[i]-'0')*ll(b[j]-'0');
}
}
cout<<ans;
}