#include <bits/stdc++.h>
using namespace std;
long long int mint(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  int arr[10];
  arr[0] = 2;
  arr[1] = 7;
  arr[2] = 2;
  arr[3] = 3;
  arr[4] = 3;
  arr[5] = 4;
  arr[6] = 2;
  arr[7] = 5;
  arr[8] = 1;
  arr[9] = 2;
  int n;
  cin >> n;
  int x = n % 10;
  n = n / 10;
  cout << arr[x] * arr[n];
  return 0;
}
