n, k = map(int, input().split()) if k == 1: if k > 1: print(-1) else: print(0) elif k == 2: if n > 4: print(-1) else: print('0011'[:n]) elif k == 3: if n > 8: print(-1) else: print('11101000'[:n]) else: d = [k] n -= k i = 0 t = [1, 1, 2, 2] while n: v = min(n, t[i]) d.append(v) n -= v i = (i + 1) & 3 for i, c in enumerate(d): if i % 2: print('1' * c, end='') else: print('0' * c, end='') print()