#include <bits/stdc++.h>
using namespace std;
void solve() {
  string n;
  cin >> n;
  int ans = 1;
  int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  for (int i = 0; i < n.length(); i++) {
    int index = n[i] - '0';
    ans *= a[index];
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
