#include <bits/stdc++.h>
using namespace std;
const int MAX = 20;
int cnt[MAX] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
char ch[5];
int main() {
  while (scanf("%s", ch) != EOF) {
    printf("%d\n", cnt[ch[0] - '0'] * cnt[ch[1] - '0']);
  }
  return 0;
}
