#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long ans = 1;
vector<long long> ways = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  char ch;
  while (cin >> ch) ans *= ways[ch - '0'];
  cout << ans;
  return 0;
}
