#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
int main() {
  int have[10];
  have[0] = 2;
  have[1] = 7;
  have[2] = 2;
  have[3] = 3;
  have[4] = 3;
  have[5] = 4;
  have[6] = 2;
  have[7] = 5;
  have[8] = 1;
  have[9] = 2;
  int ans = 1, tmp;
  string n;
  cin >> n;
  cout << have[n[0] - '0'] * have[n[1] - '0'] << endl;
  return 0;
}
