#include <bits/stdc++.h>
using namespace std;
int noGoods(int a) {
  if (a == 0) return 2;
  if (a == 1) return 7;
  if (a == 2) return 2;
  if (a == 3) return 3;
  if (a == 4) return 3;
  if (a == 5) return 4;
  if (a == 6) return 2;
  if (a == 7) return 5;
  if (a == 8) return 1;
  if (a == 9) return 2;
}
int main() {
  int input;
  cin >> input;
  int a = input % 10;
  int b = (input - a) / 10;
  int output = noGoods(a) * noGoods(b);
  cout << output;
}
