#include <bits/stdc++.h>
using namespace std;
int n, d[10], x, y, s;
void solve() {
  d[0] = 2;
  d[1] = 7;
  d[2] = 2;
  d[3] = 3;
  d[4] = 3;
  d[5] = 4;
  d[6] = 2;
  d[7] = 5;
  d[8] = 1;
  d[9] = 2;
  x = n / 10;
  y = n % 10;
  s = d[x] * d[y];
  printf("%d\n", s);
}
int main() {
#pragma comment(linker, "/STACK:67108864")
  while (scanf("%d", &n) != EOF) {
    solve();
  }
  return 0;
}
