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