#include <bits/stdc++.h>
using namespace std;
long long pow2(long long k, long long h) {
  if (h == 0)
    return 1;
  else if (h == 1)
    return k;
  else {
    long long p = pow2(k, h / 2);
    p *= p;
    if (h % 2 == 1) p *= k;
    return p;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool cmp(string a, string b) {
  if (a.size() < b.size())
    return 1;
  else
    return 0;
}
const double EPS = 1e-8;
long long bbb(long long n) {
  long long g = 0, i = 1;
  while (n > 0) {
    g += (n % 10) * i;
    i *= 10;
    n /= 10;
  }
  return g;
}
long long two(long long a, vector<long long>& s) {}
long long x[1001009];
long long bintwo(long long a, vector<long long>& v) {
  long long l = 0, r = v.size() - 1;
  long long mintwo = 1e9;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (abs(a - v[mid]) <= mintwo) {
      mintwo = abs(a - v[mid]);
      if (a >= v[mid])
        l = mid + 1;
      else
        r = mid - 1;
    } else
      r = mid - 1;
  }
  return mintwo;
}
long long binthree(long long a, vector<long long>& v) {
  long long l = 0, r = v.size() - 1;
  long long minthree = 1e9;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (abs(a - v[mid]) <= minthree) {
      minthree = abs(a - v[mid]);
      if (a >= v[mid])
        l = mid + 1;
      else
        r = mid - 1;
    } else
      r = mid - 1;
  }
  return minthree;
}
string fok(string s) {
  long long i = 0;
  char a = 'a';
  map<char, char> pp;
  for (long long i = 0; i < s.length(); ++i) pp[s[i]] = '*';
  for (long long i = 0; i < s.length(); ++i) {
    if (pp[s[i]] == '*') {
      pp[s[i]] = a;
      s[i] = a;
      a++;
    } else
      s[i] = pp[s[i]];
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string n;
  cin >> n;
  map<char, long long> p;
  p['0'] = 2;
  p['1'] = 7;
  p['2'] = 2;
  p['3'] = 3;
  p['4'] = 3;
  p['5'] = 4;
  p['6'] = 2;
  p['7'] = 5;
  p['8'] = 1;
  p['9'] = 2;
  long long ans = 1;
  for (int i = 0; i < n.length(); ++i) ans *= p[n[i]];
  cout << ans;
  return 0;
}
