#include <bits/stdc++.h>
using namespace std;
int cnt[10];
int main() {
  cnt[0] = 2, cnt[1] = 7, cnt[2] = 2, cnt[3] = 3, cnt[4] = 3;
  cnt[5] = 4, cnt[6] = 2, cnt[7] = 5, cnt[8] = 1, cnt[9] = 2;
  int a = getchar() - '0';
  int b = getchar() - '0';
  printf("%d", cnt[a] * cnt[b]);
  return 0;
}
