#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  int d[2] = {0}, p[2] = {0};
  cin >> n;
  d[0] = n % 10;
  d[1] = n / 10;
  for (int i = 0; i <= 2; i++) {
    if (d[i] == 8) p[i] = 1;
    if (d[i] == 0 || d[i] == 2 || d[i] == 6 || d[i] == 9) p[i] = 2;
    if (d[i] == 3 || d[i] == 4) p[i] = 3;
    if (d[i] == 5) p[i] = 4;
    if (d[i] == 7) p[i] = 5;
    if (d[i] == 1) p[i] = 7;
  }
  cout << p[0] * p[1];
  return 0;
}
