#include <bits/stdc++.h>
using namespace std;
struct st {
  long long ai;
  long long bi;
};
bool acomp(st a, st b) { return (a.bi < b.bi); }
using namespace std;
long long bs(int hits, int x, int y) {
  int low = 0;
  int high = x;
  int ans = 0;
  while (low <= high) {
    long long mid = low + (high - low) / 2;
    long long ythhits = (mid * y) / x;
    if (ythhits + mid == hits) {
      if ((mid * y) % x == 0) {
        return -1;
      } else {
        return 1;
      }
    } else if (ythhits + mid > hits) {
      high = mid - 1;
    } else if (ythhits + mid < hits) {
      low = mid + 1;
      if ((((((mid * y) / x) + 1) / y) + mid) == hits) {
        return 0;
      }
    }
  }
  return ans;
}
int main() {
  int i, j, k;
  int ar[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  int n;
  cin >> n;
  ;
  if (n <= 9) {
    printf("%d\n", ar[0] * ar[n]);
  } else {
    printf("%d\n", ar[n % 10] * ar[n / 10]);
  }
}
