#include <bits/stdc++.h>
using namespace std;
vector<int> v[] = {
    {0, 8}, {0, 1, 3, 4, 7, 8, 9}, {2, 8}, {3, 8, 9}, {4, 8, 9}, {5, 6, 8, 9},
    {6, 8}, {0, 3, 7, 8, 9},       {8},    {8, 9}};
int main() {
  ios::sync_with_stdio(false);
  string s;
  while (cin >> s) {
    cout << v[s[0] - '0'].size() * v[s[1] - '0'].size() << "\n";
  }
  return 0;
}
