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