#include <bits/stdc++.h>
using namespace std;
int calc(int num) {
  switch (num) {
    case '0':
      return 2;
      break;
    case '1':
      return 7;
      break;
    case '2':
      return 2;
      break;
    case '3':
      return 3;
      break;
    case '4':
      return 3;
      break;
    case '5':
      return 4;
      break;
    case '6':
      return 2;
      break;
    case '7':
      return 5;
      break;
    case '8':
      return 1;
      break;
    case '9':
      return 2;
      break;
    default:
      break;
  }
  return 0;
}
int main() {
  string s;
  while (cin >> s) {
    int ans = calc(s[0]);
    ans *= calc(s[1]);
    cout << ans << endl;
  }
  return 0;
}
