#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 4;
int n, k;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  cin >> n >> k;
  int c = 0, a = (n - k) / 2;
  while (c < n) {
    for (int i = 0; i <= a; i++) {
      cout << "01"[i == a];
      c++;
      if (c == n) break;
    }
  }
}
