#include <bits/stdc++.h>
int digit[10][7] = {{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 temp[2][7];
void Initialise_temp(char *st) {
  for (int i = 0; i < 7; i++) {
    temp[0][i] = digit[st[0] - '0'][i];
  }
  for (int i = 0; i < 7; i++) {
    temp[1][i] = digit[st[1] - '0'][i];
  }
}
int count() {
  int c1 = 0;
  for (int i = 0; i < 10; i++) {
    int flag = 1;
    for (int j = 0; j < 7 && (flag == 1); j++) {
      if ((temp[0][j] == 1)) {
        if (digit[i][j] == 0) flag = 0;
      }
    }
    c1 = c1 + flag;
  }
  int c2 = 0;
  for (int i = 0; i < 10; i++) {
    int flag = 1;
    for (int j = 0; j < 7 && (flag == 1); j++) {
      if ((temp[1][j] == 1)) {
        if (digit[i][j] == 0) flag = 0;
      }
    }
    c2 = c2 + flag;
  }
  return c1 * c2;
}
int main() {
  char *st = (char *)calloc(4, sizeof(char));
  scanf("%s", st);
  Initialise_temp(st);
  printf("%d", count());
}
