#include<iostream> using namespace std; int sum(int x) { int count = 0; while(x) { count += (x % 10); x /= 10; } return count; } int main(void) { int x,y; while(cin >> x >> y) { cout << sum(x) * sum (y) <<endl; } return 0; }