#include <bits/stdc++.h>
using namespace std;
int main() {
  int d[11] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, i, ans = 1;
  string s;
  cin >> s;
  for (i = 0; s[i]; ++i) ans *= d[s[i] - 48];
  cout << ans;
}
