#int(input()) #map(int, input().split()) #list(map(int, input().split())) def f(x): m = 1 l = len(x) for i in range(l-1): for j in range(i+2, l+1): u = x[i:j] # print(u, i, j) if u == u[::-1]: m = max(m, j-i) return m N, K = map(int, input().split()) if N <= 8: ff = 0 for i in range(1 << N): # i = 24 b = format(i, "0" + str(N) + "b") a = f(b) if a == K: ff = 1 break if ff == 1: print(b) else: print(-1) else: if K <= 3: print(-1) else: s = "1" * K + "010011" * (N // 6 + 1) print(s[:N])