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