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