#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int n;
  string s;
  cin >> s;
  int res = 1;
  for (int i = 0; i < 2; i++) {
    if (s[i] == '0' || s[i] == '9' || s[i] == '6' || s[i] == '2')
      res *= 2;
    else if (s[i] == '8')
      res *= 1;
    else if (s[i] == '7')
      res *= 5;
    else if (s[i] == '3' || s[i] == '4')
      res *= 3;
    else if (s[i] == '5')
      res *= 4;
    else if (s[i] == '1')
      res *= 7;
  }
  cout << res;
  return 0;
}
