#include <bits/stdc++.h>
using namespace std;
int main() {
  char twoDigt[2];
  int x = 0, y = 0;
  for (int i = 0; i < 2; i++) cin >> twoDigt[i];
  if (twoDigt[0] == '0' || twoDigt[0] == '9')
    x = 2;
  else if (twoDigt[0] == '1')
    x = 7;
  else if (twoDigt[0] == '7')
    x = 5;
  else if (twoDigt[0] == '3' || twoDigt[0] == '4')
    x = 3;
  else if (twoDigt[0] == '5')
    x = 4;
  else if (twoDigt[0] == '8')
    x = 1;
  else if (twoDigt[1] == '2')
    x = 2;
  else
    x = 2;
  if (twoDigt[1] == '0' || twoDigt[1] == '9')
    y = 2;
  else if (twoDigt[1] == '1')
    y = 7;
  else if (twoDigt[1] == '2' || twoDigt[1] == '6')
    y = 2;
  else if (twoDigt[1] == '7')
    y = 5;
  else if (twoDigt[1] == '3' || twoDigt[1] == '4')
    y = 3;
  else if (twoDigt[1] == '5')
    y = 4;
  else if (twoDigt[1] == '8')
    y = 1;
  cout << x * y;
  return 0;
}
