#include <bits/stdc++.h>
using namespace std;
int poss_num(int num) {
  switch (num) {
    case 0:
      return 2;
    case 1:
      return 7;
    case 2:
      return 2;
    case 3:
      return 3;
    case 4:
      return 3;
    case 5:
      return 4;
    case 6:
      return 2;
    case 7:
      return 5;
    case 8:
      return 1;
    case 9:
      return 2;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  int t = N % 10;
  N /= 10;
  cout << poss_num(t) * poss_num(N);
  return 0;
}
