#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[10];
  int b[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2}, x, y;
  scanf("%s", a);
  x = a[0] - '0';
  y = a[1] - '0';
  printf("%d\n", b[x] * b[y]);
  return 0;
}
