#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  int impreso = 0, dif = (n - k) >> 1;
  while (impreso < n) {
    for (int i = 0; i < dif; ++i)
      if (impreso < n) impreso++, cout << '1';
    if (impreso < n) impreso++, cout << '0';
  }
  cout << '\n';
  return 0;
}
