#include <bits/stdc++.h>
using namespace std;
int main() {
  int c = 1;
  string n;
  cin >> n;
  map<char, int> m;
  m['0'] = 2;
  m['1'] = 7;
  m['2'] = 2;
  m['3'] = 3;
  m['4'] = 3;
  m['5'] = 4;
  m['6'] = 2;
  m['7'] = 5;
  m['8'] = 1;
  m['9'] = 2;
  for (int i = 0; i < n.size(); i++) {
    c *= m[n[i]];
  }
  cout << c;
  return 0;
}
