#include <bits/stdc++.h>
using namespace std;
int main() {
  int m = 1, n;
  int a[11] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  cin >> n;
  for (int i = 0; i < 10; i++) {
    if (n / 10 == i) {
      m = a[i];
      for (int j = 0; j < 10; j++) {
        if (n % 10 == j) {
          m *= a[j];
          break;
        }
      }
      break;
    }
  }
  cout << m;
  return 0;
}
