#include <bits/stdc++.h>
using namespace std;
string s;
int check(char ch) {
  if (ch == '0')
    return 2;
  else if (ch == '1')
    return 7;
  else if (ch == '2')
    return 2;
  else if (ch == '3')
    return 3;
  else if (ch == '4')
    return 3;
  else if (ch == '5')
    return 4;
  else if (ch == '6')
    return 2;
  else if (ch == '7')
    return 5;
  else if (ch == '8')
    return 1;
  else
    return 2;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> s;
  cout << check(s[0]) * check(s[1]) << endl;
  return 0;
}
