#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0)
    return a;
  else
    return gcd(a % b, b);
}
int main() {
  long long int i, j;
  string s;
  cin >> s;
  int a[2];
  for (i = 0; i < s.size(); i++) {
    char x = s[i];
    if (x == '5')
      a[i] = 4;
    else if (x == '2' || x == '6' || x == '9')
      a[i] = 2;
    else if (x == '7')
      a[i] = 5;
    else if (x == '4' || x == '3')
      a[i] = 3;
    else if (x == '8')
      a[i] = 1;
    else if (x == '0')
      a[i] = 2;
    else if (x == '1')
      a[i] = 7;
  }
  long long int ans = a[0] * a[1];
  cout << ans << endl;
  return 0;
}
