#include <bits/stdc++.h>
using namespace std;
const double maxdouble = numeric_limits<double>::max();
const double eps = 1e-10;
const int INF = 0x7FFFFFFF;
int len[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
char s[3];
int main() {
  while (cin >> s) {
    cout << len[s[1] - '0'] * len[s[0] - '0'] << endl;
  }
  return 0;
}
