#include <bits/stdc++.h>
using namespace std;
int main() {
  char a, b;
  cin >> a >> b;
  int c, d;
  c = a - '0';
  d = b - '0';
  int m, n;
  switch (d) {
    case 0:
      n = 2;
      break;
    case 1:
      n = 7;
      break;
    case 2:
      n = 2;
      break;
    case 3:
      n = 3;
      break;
    case 4:
      n = 3;
      break;
    case 5:
      n = 4;
      break;
    case 6:
      n = 2;
      break;
    case 7:
      n = 5;
      break;
    case 8:
      n = 1;
      break;
    case 9:
      n = 2;
      break;
  }
  m = n;
  switch (c) {
    case 0:
      n = 2;
      break;
    case 1:
      n = 7;
      break;
    case 2:
      n = 2;
      break;
    case 3:
      n = 3;
      break;
    case 4:
      n = 3;
      break;
    case 5:
      n = 4;
      break;
    case 6:
      n = 2;
      break;
    case 7:
      n = 5;
      break;
    case 8:
      n = 1;
      break;
    case 9:
      n = 2;
      break;
  }
  cout << m * n << endl;
  return 0;
}
