#include<bits/stdc++.h> using namespace std; int a, b; int main() { cin >> a >> b; int r1 = a%10, r2 = b%10; a -= r1, b -= r2; a /= 10, b /= 10; cout << r1*b+r1*r2+r2*a+a*b << endl; return 0; }