#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt[3], g, i;
  char str1[5], *b, *e;
  int A[] = {1, 6, 1, 2, 2, 3, 1, 4, 0, 1};
  scanf("%s", str1);
  i = 0;
  cnt[0] = 1;
  cnt[1] = 1;
  for (b = str1, e = &str1[2 - 1]; b <= e; b++) {
    cnt[i] = cnt[i] + A[(int)*b % 48];
    i++;
  }
  printf("%d\n", cnt[0] * cnt[1]);
  return 0;
}
