#include <bits/stdc++.h> using namespace std; int a,b,ans; int main(){ // freopen("J2.in","r",stdin); // freopen("J2.out","w",stdout); cin>>a>>b;cout<<(a%10+((a-(a%10))/10))*(b%10+((b-(b%10))/10))<<endl; return 0; }