#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  int a[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  string n;
  cin >> n;
  int left = n[0] - '0';
  int right = n[1] - '0';
  cout << a[left] * a[right];
  return 0;
}
