#include <bits/stdc++.h>
using namespace std;
int mark[15] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
  int i, len, j, k, n, m;
  char a[100];
  scanf("%s", a);
  len = strlen(a);
  int s = 1;
  for (i = 0; i < len; i++) {
    s *= mark[a[i] - '0'];
  }
  printf("%d\n", s);
  return 0;
}
