#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int x1, x2, k1 = 0, k2 = 0, count1 = 0, count2 = 0;
  int a[10][7] = {{1, 1, 1, 0, 1, 1, 1}, {0, 0, 1, 0, 0, 0, 1},
                  {0, 1, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 0, 1, 1},
                  {1, 0, 1, 1, 0, 0, 1}, {1, 1, 0, 1, 0, 1, 1},
                  {1, 1, 0, 1, 1, 1, 1}, {0, 1, 1, 0, 0, 0, 1},
                  {1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 0, 1, 1}};
  int arr1[7], arr2[7];
  cin >> n;
  x2 = n % 10;
  n = n / 10;
  x1 = n % 10;
  for (int i = 0; i <= 6; ++i) {
    if (a[x1][i] == 1) {
      arr1[k1] = i;
      ++k1;
    }
  }
  for (int i = 0; i <= 6; ++i) {
    if (a[x2][i] == 1) {
      arr2[k2] = i;
      ++k2;
    }
  }
  int flag1, flag2;
  for (int i = 0; i <= 9; ++i) {
    flag1 = 0;
    for (int k = 0; k < k1; ++k) {
      if (a[i][arr1[k]] == 1) {
        flag1 = 1;
      } else {
        flag1 = 0;
        break;
      }
    }
    if (flag1) {
      count1++;
    }
  }
  for (int i = 0; i <= 9; ++i) {
    flag2 = 0;
    for (int k = 0; k < k2; ++k) {
      if (a[i][arr2[k]] == 1) {
        flag2 = 1;
      } else {
        flag2 = 0;
        break;
      }
    }
    if (flag2) {
      count2++;
    }
  }
  cout << count1 * count2 << endl;
}
