#include <bits/stdc++.h>
using namespace std;
const int maxn = 100003;
int n, k;
char s[maxn];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1, j; i <= n; i = j + 1) {
    j = i;
    for (; j <= n && j < i + ((n - k) >> 1); j++) s[j] = '1';
    if (j <= n) s[j] = '0';
  }
  puts(s + 1);
  return 0;
}
