#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int need[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  string s;
  cin >> s;
  cout << need[s[0] - '0'] * need[s[1] - '0'] << "\n";
  return 0;
}
