#include <bits/stdc++.h>
using namespace std;
int func(int n) {
  switch (n) {
    case 0:
      return 2;
    case 1:
      return 7;
    case 2:
      return 2;
    case 3:
      return 3;
    case 4:
      return 3;
    case 5:
      return 4;
    case 6:
      return 2;
    case 7:
      return 5;
    case 8:
      return 1;
    default:
      return 2;
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  cout << func(n % 10) * func(n / 10) << endl;
  return 0;
}
