#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int x = (n - k) / 2;
  for (int i = 0; i < n; ++i) {
    if (x) {
      cout << 1;
      --x;
    } else
      cout << 0, x = (n - k) / 2;
  }
  cout << endl;
  return 0;
}
