#include <bits/stdc++.h>
using namespace std;
int main() {
  string t[] = {"1111110", "0110000", "1101101", "1111001", "0110011",
                "1011011", "1011111", "1110000", "1111111", "1111011"};
  vector<string> a(t, t + 10);
  string p;
  cin >> p;
  int cnt = 0;
  for (int i = 0; i <= 99; i++) {
    int y1 = (p[1] - '0');
    int y2 = (p[0] - '0');
    int x1 = (i % 10);
    int x2 = (i / 10) % 10;
    bool done = true;
    for (int j = 0; j < 7; j++) {
      if (a[x1][j] == '0' && a[y1][j] == '1') done = false;
    }
    if (done) {
      for (int j = 0; j < 7; j++) {
        if (a[x2][j] == '0' && a[y2][j] == '1') done = false;
      }
    }
    if (done) cnt++;
  }
  cout << cnt << "\n";
  return 0;
}
