#include <bits/stdc++.h>
using namespace std;
vector<long long> vprime;
void SieveOfEratosthenes(int n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) vprime.push_back(p);
}
int countFreq(string &pat, string &txt) {
  int M = pat.length();
  int N = txt.length();
  int res = 0;
  for (int i = 0; i <= N - M; i++) {
    int j;
    for (j = 0; j < M; j++)
      if (txt[i + j] != pat[j]) break;
    if (j == M) {
      res++;
      j = 0;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long a, b, c, d, e, g, h, k, l, m, n, t, f,
      f1 = 0, flag2 = 0, flag = 0, flag1 = 0, co = 0, co1 = 0, co2 = 0, sum = 0,
      sum1 = 0, ma = 0, ma1 = 0, ma2 = 0, mi = 100000000000, mi1 = 100000000000,
      mi2 = 100, mi3 = 1000;
  long long co3 = 0, co4 = 0, co5 = 0, co6 = 0, co7 = 0, co8 = 0, mul = 1,
            sum2 = 0;
  long long arr[100001], arr1[100001] = {0};
  long long a1, a2, b1, b2, c1, c2, a3, a4, b3, b4, b5, b6, m1, m2, k1, l1, m3,
      m4, d1, d2;
  double pi = 2 * acos(0.0);
  char ch;
  string str, str1, str2, str3, str4, str5;
  set<long long> s1;
  set<long long> s2;
  set<long long> s3;
  stack<long long> st;
  int x[] = {1, -1, 1, -1, 2, 2, -2, -2};
  int y[] = {2, 2, -2, -2, 1, -1, 1, -1};
  cin >> a >> b;
  if (b == 0) {
    cout << a << endl;
    return 0;
  }
  c = 1;
  for (int i = 1; i <= b; i++) {
    c = c * 10;
  }
  e = a % 10;
  if (e % 2 == 0 || e == 5) {
    for (int i = 1; i <= c; i++) {
      co = 0;
      d = a * i;
      f = d;
      while (d > 0) {
        g = d % 10;
        if (g == 0) {
          co++;
          if (co == b) {
            cout << f << endl;
            return 0;
          }
        } else
          break;
        d = d / 10;
      }
    }
  } else
    cout << a * c << endl;
  return 0;
}
