#include <bits/stdc++.h>
using namespace std;
int main() {
  char x, y;
  int i, j;
  scanf("%c%c", &x, &y);
  if (x == '1')
    i = 7;
  else if (x == '7')
    i = 5;
  else if (x == '5')
    i = 4;
  else if (x == '3' || x == '4')
    i = 3;
  else if (x == '2' || x == '9' || x == '6' || x == '0')
    i = 2;
  else if (x == '8')
    i = 1;
  if (y == '1')
    j = 7;
  else if (y == '7')
    j = 5;
  else if (y == '5')
    j = 4;
  else if (y == '3' || y == '4')
    j = 3;
  else if (y == '2' || y == '9' || y == '6' || y == '0')
    j = 2;
  else if (y == '8')
    j = 1;
  printf("%d\n", i * j);
  return 0;
}
