#include <bits/stdc++.h>
using namespace std;
int main() {
  int v[10];
  v[0] = 2;
  v[1] = 7;
  v[2] = 2;
  v[3] = 3;
  v[4] = 3;
  v[5] = 4;
  v[6] = 2;
  v[7] = 5;
  v[8] = 1;
  v[9] = 2;
  char a, b;
  cin >> a >> b;
  cout << v[(int)a - '0'] * v[(int)b - '0'] << endl;
}
