#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, dif, cnt, temp;
  scanf("%d %d", &(n), &(k));
  dif = n - k;
  cnt = dif / 2;
  temp = cnt;
  while (n) {
    if (temp > 0) {
      printf("0");
      temp--;
    } else {
      printf("1");
      temp = cnt;
    }
    n--;
  }
  printf("\n");
  return 0;
}
