#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long hcf(long long p, long long q) {
  if (p > q) return hcf(q, p);
  if (p == 0) return q;
  return hcf(q % p, p);
}
long long lcm(long long p, long long q) { return p * q / hcf(p, q); }
long long power(long long a, long long n, long long mod) {
  long long ans = 1;
  while (n) {
    if (n % 2) ans *= a;
    a *= a;
    n /= 2;
    a %= mod;
    ans %= mod;
  }
  return ans;
}
void solve() {
  long long n, k;
  cin >> n >> k;
  string s, t;
  long long x = (n - k) / 2;
  for (long long i = 0; i < x; i++) s += '0';
  s += '1';
  while (((long long)(t).size()) < n) t += s;
  while (((long long)(t).size()) != n) t.pop_back();
  cout << t;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
