#include <bits/stdc++.h>
char getGoodFigure(char& val);
int main() {
  char first, second;
  first = getchar() - '0';
  second = getchar() - '0';
  char answer = getGoodFigure(first) * getGoodFigure(second);
  printf("%i\n", answer);
  return 0;
}
char getGoodFigure(char& val) {
  switch (val) {
    case 8:
      return 1;
      break;
    case 0:
    case 2:
    case 6:
    case 9:
      return 2;
      break;
    case 3:
    case 4:
      return 3;
      break;
    case 5:
      return 4;
      break;
    case 7:
      return 5;
      break;
    case 1:
      return 7;
      break;
    default:
      return -1;
  }
}
