#include <bits/stdc++.h>
using namespace std;
int N, M;
int main(void) {
  scanf("%d%d", &N, &M);
  int c = (N - M) / 2;
  int cnt = 0;
  while (1) {
    for (int i = 1; i <= c; i++) {
      printf("0");
      cnt++;
      if (cnt == N) break;
    }
    if (cnt == N) break;
    printf("1");
    cnt++;
    if (cnt == N) break;
  }
  return 0;
}
