#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 1;
  int a[2][10] = {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
                  {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}};
  int n;
  cin >> n;
  int d = n % 10;
  if (n <= 9)
    ans = 2 * a[1][d];
  else {
    int x = n / 10;
    ans = ans * (a[1][d]) * (a[1][x]);
  }
  cout << ans << endl;
  return 0;
}
