#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  int k;
  cin >> k;
  long long int p = 1;
  while (k--) {
    p *= 10;
  }
  long long int c = p;
  if (n % p == 0 || k == 0) {
    cout << n;
    return 0;
  }
  if (p % n == 0) {
    cout << p;
    return 0;
  }
  if (p <= n) {
    p = n;
  } else if (p > n) {
    long long int q = p % n;
    p = p + (n - q);
  }
  for (long long int x = p;; x += n) {
    if (x % c == 0) {
      cout << x;
      return 0;
    }
  }
}
