#include <bits/stdc++.h>
template <class T>
T Max(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max(Max(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min(Min(a, b), c);
}
template <class T>
void Swap(T& a, T& b) {
  T temp;
  temp = a;
  a = b;
  b = temp;
}
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  char ch;
  int a, b;
  cin >> ch;
  a = ch - '0';
  cin >> ch;
  b = ch - '0';
  cout << arr[a] * arr[b];
  return 0;
}
