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