#include <bits/stdc++.h>
using namespace std;
int main() {
  map<int, int> m{{0, 2}, {1, 7}, {2, 2}, {3, 3}, {4, 3},
                  {5, 4}, {6, 2}, {7, 5}, {8, 1}, {9, 2}};
  string s;
  cin >> s;
  cout << m[s[0] - '0'] * m[s[1] - '0'] << endl;
}
