#include <bits/stdc++.h>
using namespace std;
vector<int> v[10];
vector<int> w[10];
int main() {
  int(n);
  scanf("%d", &(n));
  ;
  v[0].push_back(1);
  v[3].push_back(1);
  v[3].push_back(7);
  v[4].push_back(1);
  v[6].push_back(5);
  v[6].push_back(7);
  v[7].push_back(1);
  for (int i = (0); i < (10); ++i)
    if (i != 8) v[8].push_back(i);
  int u[] = {1, 3, 4, 5, 7};
  for (int j = (0); j < (5); ++j) v[9].push_back(u[j]);
  for (int i = (0); i < (10); ++i) v[i].push_back(i);
  for (int j = (0); j < (10); ++j)
    for (int k = (0); k < (v[j].size()); ++k) w[v[j][k]].push_back(j);
  int a1 = n % 10, a2 = n / 10;
  printf("%d\n", w[a1].size() * w[a2].size());
}
