#include <bits/stdc++.h>
using namespace std;
int answer(int number) {
  int x[2], y, t, i = 0, count = 2;
  while (count--) {
    y = number % 10;
    number /= 10;
    if (y == 8)
      x[i++] = 1;
    else if (y == 3 || y == 4)
      x[i++] = 3;
    else if (y == 0 || y == 2 || y == 6 || y == 9)
      x[i++] = 2;
    else if (y == 1)
      x[i++] = 7;
    else if (y == 7)
      x[i++] = 5;
    else if (y == 5)
      x[i++] = 4;
  }
  return x[0] * x[1];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  cout << answer(n) << endl;
  return 0;
}
