#include <bits/stdc++.h>
int main() {
  int n, x1, x2, i, j;
  scanf("%d", &n);
  x1 = n % 10;
  x2 = n / 10;
  if (x1 == 0)
    i = 2;
  else if (x1 == 1)
    i = 7;
  else if (x1 == 2)
    i = 2;
  else if (x1 == 3)
    i = 3;
  else if (x1 == 4)
    i = 3;
  else if (x1 == 5)
    i = 4;
  else if (x1 == 6)
    i = 2;
  else if (x1 == 7)
    i = 5;
  else if (x1 == 8)
    i = 1;
  else
    i = 2;
  if (x2 == 0)
    j = 2;
  else if (x2 == 1)
    j = 7;
  else if (x2 == 2)
    j = 2;
  else if (x2 == 3)
    j = 3;
  else if (x2 == 4)
    j = 3;
  else if (x2 == 5)
    j = 4;
  else if (x2 == 6)
    j = 2;
  else if (x2 == 7)
    j = 5;
  else if (x2 == 8)
    j = 1;
  else
    j = 2;
  printf("%d", i * j);
  return 0;
}
