def rev(s): return s[::-1] def pad(s, N): return "0" * (N - len(s)) + s def check(s, K): N = len(s) ma = 0 for i in range(N): for j in range(i, N + 1): if s[i:j] == rev(s[i:j]): ma = max(ma, j - i) if ma == K: print(s) exit() return N, K = map(int, input().split()) if N <= 15: for i in range(1 << N): s = bin(i)[2:] s = pad(s, N) check(s, K) print(-1) else: if K <= 3: print(-1) else: ans = [1] * K + [0, 0, 1, 0, 1, 1] * N print(*ans[:N], sep="")