#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> ans;
  int a = (n - k) / 2;
  while (ans.size() < n) {
    for (int i = 0; i < a; i++) ans.push_back(0);
    ans.push_back(1);
  }
  for (int i = 0; i < n; i++) printf("%d", ans[i]);
  puts("");
}
