#include <bits/stdc++.h>
int val[10] = {
    127 - 2,       16 + 64,  127 - 8 - 64, 127 - 8 - 32, 127 - 1 - 4 - 32,
    127 - 16 - 32, 127 - 16, 1 + 16 + 64,  127,          127 - 32};
int n;
int main() {
  scanf("%d", &n);
  int d1 = (n / 10), d2 = (n % 10), cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < 10; i++)
    if ((val[d1] & val[i]) == val[d1]) cnt1++;
  for (int i = 0; i < 10; i++)
    if ((val[d2] & val[i]) == val[d2]) cnt2++;
  printf("%d\n", cnt1 * cnt2);
  return 0;
}
