#include <bits/stdc++.h>
int arr[10][10] = {{1, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 0, 0, 0, 0},
                   {1, 1, 0, 1, 1, 0, 1}, {1, 1, 1, 1, 0, 0, 1},
                   {0, 1, 1, 0, 0, 1, 1}, {1, 0, 1, 1, 0, 1, 1},
                   {1, 0, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 0, 0, 0},
                   {1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 0, 1, 1}};
int devolve(int n) {
  int count = 0;
  for (int i = 0; i < 10; i++) {
    count++;
    for (int j = 0; j < 10; j++)
      if (arr[n][j] == 1 && arr[i][j] == 0) {
        count--;
        break;
      }
  }
  return count;
}
int main(void) {
  char x, y;
  scanf("%c", &x);
  scanf("%c", &y);
  x -= '0';
  y -= '0';
  printf("%d\n", devolve(x) * devolve(y));
  return 0;
}
