#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
const int N = 1e6+10;
int t,n,m,k,l,r,op,x,y;
string s1,s2;
void solve(){
cin>>s1>>s2;
int siz1 = s1.size();
int siz2 = s2.size();
for(int i = 0;i<siz1;i++){
for(int j = 0;j<siz2;j++){
x += (s1[i]-'0')*(s2[j]-'0');
}
}
cout<<x;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}