#include <bits/stdc++.h>
using namespace std;
int func(int a) {
  if (a == 0)
    return 2;
  else if (a == 1)
    return 7;
  else if (a == 2)
    return 2;
  else if (a == 3)
    return 3;
  else if (a == 4)
    return 3;
  else if (a == 5)
    return 4;
  else if (a == 6)
    return 2;
  else if (a == 7)
    return 5;
  else if (a == 8)
    return 1;
  else
    return 2;
}
int main() {
  int n, f, f1;
  cin >> n;
  f = n % 10;
  f1 = n / 10;
  int ans1 = func(f);
  int ans2 = func(f1);
  cout << ans1 * ans2 << endl;
  return 0;
}
