#include <bits/stdc++.h>
using namespace std;
char c, d;
long long a[104];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> c >> d;
  a[0] = 2;
  a[1] = 7;
  a[2] = 2;
  a[3] = 3;
  a[4] = 3;
  a[5] = 4;
  a[6] = 2;
  a[7] = 5;
  a[8] = 1;
  a[9] = 2;
  cout << a[c - '0'] * a[d - '0'] << '\n';
  return 0;
}
