#include <bits/stdc++.h>
using namespace std;
int answer();
int main() {
  long long t;
  t = 1;
  while (t--) {
    answer();
  }
  return 0;
}
int answer() {
  string k;
  cin >> k;
  int sup[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  if (k.size() > 1) {
    cout << sup[k[0] - '0'] * sup[k[1] - '0'] << endl;
  } else {
    cout << sup[k[0] - '0'] << endl;
  }
  return 0;
}
