N, K = map(int, input().split()) if K == 1: if N == 1: print(0) else: print(-1) elif K > N: print(-1) else: required_min = (N + 1) // 2 if K < required_min: print(-1) else: if K == N: print('0' * N) else: # Construct the palindrome part if K % 2 == 0: half = K // 2 first_part = ['0'] + ['1'] * (half - 1) first_part = first_part[:half] # Ensure correct length second_part = first_part[::-1] palindrome = ''.join(first_part + second_part) else: m = (K - 1) // 2 first_part = ['0'] + ['1'] * (m - 1) first_part = first_part[:m] # first m-1 characters? middle = ['0'] second_part = first_part[::-1] palindrome = ''.join(first_part + middle + second_part) # Append remaining characters remaining_length = N - K if remaining_length > 0: # The last character of the palindrome is '0' for even, '1' or '0' for odd # We append '1' followed by '0's to break any possible palindromes remaining = '1' + '0' * (remaining_length - 1) result = palindrome + remaining else: result = palindrome print(result)