n,k = map(int,input().split()) s = "101100" if k >= 4: print(("0"*k+s*(n//6+2))[:n]) elif k == 3: if n <= 8: print("00010111"[:n]) else: print(-1) elif k == 2: if n <= 4: print("1100"[:n]) else: print(-1) elif k == 1: if n <= 1: print("1100"[:n]) else: print(-1)