#include <bits/stdc++.h>
using namespace std;
int main() {
  int x[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  int n, i1, i2;
  cin >> n;
  i1 = n % 10;
  i2 = n / 10;
  cout << x[i1] * x[i2];
  return 0;
}
