#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const int N = (int)(3e5 + 20);
const int L = 360;
const long long int M = (int)(1e9 + 7);
const double E = 1e-7;
int d[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
  ios_base::sync_with_stdio(0);
  char c1, c2;
  cin >> c1 >> c2;
  cout << d[c1 - '0'] * d[c2 - '0'];
}
