#include <bits/stdc++.h>
using namespace std;
bool comp(int i, int j) { return i > j; }
int main() {
  int arr[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  int n;
  cin >> n;
  cout << arr[n / 10] * arr[n % 10];
}
