#include <bits/stdc++.h>
int poss(char ch) {
  if (ch == '3' || ch == '4') return 3;
  if (ch == '0' || ch == '6' || ch == '9' || ch == '2') return 2;
  if (ch == '1') return 7;
  if (ch == '5') return 4;
  if (ch == '8') return 1;
  if (ch == '7') return 5;
}
int main() {
  char str[3];
  gets(str);
  printf("%d\n", poss(str[0]) * poss(str[1]));
  return 0;
}
