#include <bits/stdc++.h>
using namespace std;
int a[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
  int n;
  scanf("%d", &n);
  int ans = (a[n % 10]) * (a[(n / 10) % 10]);
  printf("%d\n", ans);
}
