#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T big(T a, T b) {
  return a > b ? a : b;
}
template <class T>
inline T small(T a, T b) {
  return a < b ? a : b;
}
int ebi(int a) {
  if (a == 1)
    return 7;
  else if (a == 7)
    return 5;
  else if (a == 5)
    return 4;
  else if (a == 8)
    return 1;
  else if (a == 3 || a == 4)
    return 3;
  else
    return 2;
}
int main(void) {
  int i, j;
  int n;
  int a, b, c, d;
  cin >> n;
  a = n % 10;
  b = n / 10;
  c = ebi(a);
  d = ebi(b);
  cout << c * d << endl;
  return 0;
}
