#include <bits/stdc++.h>
using namespace std;
int f(char a) {
  if (a == '0') return 1;
  if (a == '1') return 6;
  if (a == '2') return 1;
  if (a == '3') return 2;
  if (a == '4') return 2;
  if (a == '5') return 3;
  if (a == '6') return 1;
  if (a == '7') return 4;
  if (a == '8') return 0;
  if (a == '9') return 1;
}
int main() {
  string s;
  cin >> s;
  long long out = 1;
  for (int i = 0; i < s.size(); i++) {
    out *= f(s[i]) + 1;
  }
  cout << out << endl;
}
