#include <bits/stdc++.h>
using namespace std;
int counter(char a) {
  int c = 1;
  if ('9' == a || '2' == a || '6' == a || '0' == a)
    c = 2;
  else if ('7' == a)
    c = 5;
  else if ('5' == a)
    c = 4;
  else if ('3' == a || '4' == a)
    c = 3;
  else if ('1' == a)
    c = 7;
  return c;
}
int main() {
  string n;
  cin >> n;
  int co = 1;
  for (int i = 0; i < 2; i++) {
    co *= counter(n[i]);
  }
  cout << co << endl;
  return 0;
}
