#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int digit[10] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  string n;
  cin >> n;
  int a = digit[(n[1] - 48)];
  int b = digit[(n[0] - 48)];
  cout << a * b;
  return 0;
}
