#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
template <typename T>
void die(T s) {
  cout << s;
  exit(0);
}
int main() {
  ios_base::sync_with_stdio(0);
  int tab[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  char c1, c2;
  cin >> c1 >> c2;
  cout << tab[c1 - '0'] * tab[c2 - '0'];
  return 0;
}
