#include <bits/stdc++.h>
constexpr intmax_t operator""_jd(unsigned long long n) { return n; }
constexpr uintmax_t operator""_ju(unsigned long long n) { return n; }
constexpr size_t operator""_zu(unsigned long long n) { return n; }
int main() {
  size_t n, k;
  scanf("%zu %zu", &n, &k);
  std::string unit((n - k) / 2, '1');
  unit += '0';
  std::string res = unit;
  while (res.length() < n) res += unit;
  res.resize(n);
  printf("%s\n", res.c_str());
}
