#include <bits/stdc++.h>
using namespace std;
int main() {
  int visited[] = {2, 7, 2, 3, 3, 4, 2, 5, 1, 2};
  int n;
  string s;
  while (cin >> s) {
    int a = s[0] - '0';
    int b = s[1] - '0';
    int sum = visited[a] * visited[b];
    cout << sum << endl;
  }
}
