#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void dout() { cerr << endl; }
template <typename Head, typename... Tail>
void dout(Head H, Tail... T) {
  cerr << H << ' ';
  dout(T...);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  int x = 1;
  int curK = n;
  while (curK > k) {
    x++;
    curK -= 2;
  }
  string ans;
  for (int i = 1; i <= n; i++) {
    if (i % x == 0)
      ans += '1';
    else
      ans += '0';
  }
  cout << ans;
  return 0;
}
