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