#include <bits/stdc++.h>
using namespace std;
long long a[100];
int main() {
  a[0] = 2;
  a[1] = 7;
  a[2] = 2;
  a[3] = 3;
  a[4] = 3;
  a[5] = 4;
  a[6] = 2;
  a[7] = 5;
  a[8] = 1;
  a[9] = 2;
  string s;
  cin >> s;
  int k = 1;
  for (int i = 0; i < s.size(); i++) {
    k *= a[(int(s[i] - 48))];
  }
  cout << k;
}
