#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
const int inf = 1e9 + 77;
const int MOD = 1e9 + 7;
long long x[MAX];
char ALPH[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
char ALPH_C[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                   'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
                   'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
long long power(long long x, long long y) {
  if (y == 0) return 1;
  long long second = power(x, y / 2);
  second *= second;
  if (y % 2 == 1) second *= x;
  return second;
}
long long sum = 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  map<char, int> mp;
  mp['0'] = 2;
  mp['1'] = 7;
  mp['2'] = 2;
  mp['3'] = 3;
  mp['4'] = 3;
  mp['5'] = 4;
  mp['6'] = 2;
  mp['7'] = 5;
  mp['8'] = 1;
  mp['9'] = 2;
  string second;
  cin >> second;
  for (int i = 0; i < second.size(); i++) {
    sum *= mp[second[i]];
  }
  cout << sum;
  return 0;
}
