#include <bits/stdc++.h>
inline int read() {
  int data = 0, w = 1;
  char ch = 0;
  while (ch != '-' && (ch > '9' || ch < '0')) ch = getchar();
  if (ch == '-') w = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') {
    data = data * 10 + ch - '0';
    ch = getchar();
  }
  return data * w;
}
inline void print(long long v) {
  if (v < 0) {
    putchar('-');
    v = -v;
  }
  if (v > 9) print(v / 10);
  putchar(v % 10 + '0');
}
int main() {
  int a, b;
  a = read();
  b = read();
  if (a >= 10 || b >= 10) return puts("0"), 0;
  print(a * b);
  return 0;
}
