#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:100000000")
int cnt[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
int main() {
  int n1, n2;
  scanf("%01d%01d", &n1, &n2);
  printf("%d\n", cnt[n1] * cnt[n2]);
  return 0;
}
