#include <bits/stdc++.h>
using namespace std;
int main() {
  char arr[5];
  int i, j, n, a, b;
  cin >> arr;
  a = int(arr[0] - '0');
  b = int(arr[1] - '0');
  int cnt[10];
  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;
  printf("%d", cnt[a] * cnt[b]);
  return 0;
}
