#include <bits/stdc++.h>
using namespace std;
int n, m, len;
int dig[10];
void initz() {
  dig[0] = 2;
  dig[1] = 7;
  dig[2] = 2;
  dig[3] = 3;
  dig[4] = 3;
  dig[5] = 4;
  dig[6] = 2;
  dig[7] = 5;
  dig[8] = 1;
  dig[9] = 2;
}
int main() {
  int i, j, k, t, a, b;
  cin >> a;
  initz();
  int first, second = a % 10;
  first = (a / 10) % 10;
  cout << dig[first] * dig[second] << "\n";
  return 0;
}
