#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  string x;
  while (cin >> x) {
    int x1[2];
    x1[0] = (int)x[0] - 48;
    x1[1] = (int)x[1] - 48;
    int help[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
    int max;
    int help1;
    int help2;
    for (int i = 0; i < 10; i++) {
      if (i == x1[0]) {
        help1 = help[i];
      }
      if (i == x1[1]) {
        help2 = help[i];
      }
    }
    cout << help1 * help2 << endl;
  }
  return 0;
}
