#include <bits/stdc++.h>
using namespace std;
int n, f, m, k, l, g, i, h, a, b, j, a1, b1, c1, c, x, y, q, w, e, r, t, d[15];
int main() {
  cin >> n;
  d[0] = 2;
  d[1] = 7;
  d[2] = 2;
  d[3] = 3;
  d[4] = 3;
  d[5] = 4;
  d[6] = 2;
  d[7] = 5;
  d[8] = 1;
  d[9] = 2;
  a = n / 10;
  b = n % 10;
  cout << d[a] * d[b];
}
