#include <bits/stdc++.h>
using namespace std;
int poss[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
  int n, r1 = 0, r2 = 0;
  cin >> n;
  r1 = n % 10;
  n /= 10;
  r2 = n % 10;
  cout << poss[r1] * poss[r2] << endl;
  return 0;
}
