#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int ara[10];
  int a, b, res;
  ara[0] = 2;
  ara[1] = 7;
  ara[2] = 2;
  ara[3] = 3;
  ara[4] = 3;
  ara[5] = 4;
  ara[6] = 2;
  ara[7] = 5;
  ara[8] = 1;
  ara[9] = 2;
  string str;
  cin >> str;
  a = str[0] - 48;
  b = str[1] - 48;
  res = ara[a] * ara[b];
  cout << res << endl;
  return 0;
}
