#include <bits/stdc++.h> using namespace std; int main(){ string a,b; while(cin >> a >> b){ int alen = a.length(); int blen = b.length(); int count = 0; for(int i = 0 ;i<alen;i++){ for(int j = 0 ; j < blen;j++){ count = count + (a[i]-'0') * (b[j]-'0'); } } cout << count << endl; } }