#include <bits/stdc++.h>
using namespace std;
string art[10000];
string number[20] = {"zero",    "one",     "two",       "three",    "four",
                     "five",    "six",     "seven",     "eight",    "nine",
                     "ten",     "eleven",  "twelve",    "thirteen", "fourteen",
                     "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
bool bland(string sss) {
  string xx = sss;
  reverse(sss.begin(), sss.end());
  if (xx == sss) return 1;
  return 0;
}
int gcd(int aaa, int bbb) { return !bbb ? aaa : gcd(bbb, aaa % bbb); }
int main() {
  int tp = 1, z = 1;
  char ch[2];
  cin >> ch[0] >> ch[1];
  {
    if (ch[0] == '0' || ch[0] == '2' || ch[0] == '6' || ch[0] == '9')
      tp *= 2;
    else if (ch[0] == '1')
      tp *= 7;
    else if (ch[0] == '3' || ch[0] == '4')
      tp *= 3;
    else if (ch[0] == '5')
      tp *= 4;
    else if (ch[0] == '7')
      tp *= 5;
    else if (ch[0] == '8')
      tp *= 1;
  }
  {
    if (ch[1] == '0' || ch[1] == '2' || ch[1] == '6' || ch[1] == '9')
      z *= 2;
    else if (ch[1] == '1')
      tp *= 7;
    else if (ch[1] == '3' || ch[1] == '4')
      z *= 3;
    else if (ch[1] == '5')
      z *= 4;
    else if (ch[1] == '7')
      z *= 5;
    else if (ch[1] == '8')
      z *= 1;
  }
  cout << tp * z;
}
