Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best friends ever since primary school and hopefully, that can somehow help them in teamwork.

For each team Olympiad, Vanya takes his play cards with numbers. He takes only the cards containing numbers 1 and 0. The boys are very superstitious. They think that they can do well at the Olympiad if they begin with laying all the cards in a row so that:  there wouldn't be a pair of any side-adjacent cards with zeroes in a row;  there wouldn't be a group of three consecutive cards containing numbers one. 

Today Vanya brought n cards with zeroes and m cards with numbers one. The number of cards was so much that the friends do not know how to put all those cards in the described way. Help them find the required arrangement of the cards or else tell the guys that it is impossible to arrange cards in such a way.


-----Input-----

The first line contains two integers: n (1 ≤ n ≤ 10^6) — the number of cards containing number 0; m (1 ≤ m ≤ 10^6) — the number of cards containing number 1.


-----Output-----

In a single line print the required sequence of zeroes and ones without any spaces. If such sequence is impossible to obtain, print -1.


-----Examples-----
Input
1 2

Output
101

Input
4 8

Output
110110110101

Input
4 10

Output
11011011011011

Input
1 5

Output
-1

Difficulty: MEDIUM
Tags: Greedy algorithms

Implementation

Constructive algorithms
Skill types: Greedy algorithms

Starter code:

Solutions:
(n, m) = [*map(int, input().split())]
if n - 1 <= m <= 2 * (n + 1):
	x = min(n - 1, m - n + 1)
	y = n - 1 - x
	m -= 2 * x + y
	print('1' * (m // 2) + '011' * x + '01' * y + '0' + '1' * (m - m // 2))
else:
	print(-1)


(n, m) = map(int, input().split())
if n == m:
	print('01' * m)
elif m == n - 1:
	print('01' * m + '0')
elif m > n and m <= 2 * (n + 1):
	while n != m and n > 0 and (m > 0):
		print('110', end='')
		n -= 1
		m -= 2
	print('10' * n, end='')
	m -= n
	print('1' * m, end='')
else:
	print(-1)


from sys import stdin, stdout
(n, m) = map(int, stdin.readline().split())
if m < n - 1:
	stdout.write('-1')
elif m == n - 1:
	stdout.write('0' + '10' * m)
elif m == n:
	stdout.write('10' * m)
elif m == n + 1:
	stdout.write('10' * n + '1')
else:
	k = m - (n + 1)
	if k > n + 1:
		stdout.write('-1')
	elif k == n + 1:
		stdout.write('110' * n + '11')
	else:
		stdout.write('110' * k + '10' * (n - k) + '1')


(n, m) = map(int, input().split())
if n - 1 <= m <= 2 * (n + 1):
	sol = []
	extras = m - 2 * (n - 1)
	if extras > 0:
		sol.append('1' if extras == 1 else '11')
		m -= extras
	double1s = m - n + 1
	sol.append('0')
	sol.append('110' * double1s + '10' * (n - 1 - double1s))
	if extras > 2:
		sol.append('1' if extras == 3 else '11')
	print(''.join(sol))
else:
	print(-1)


(n, m) = map(int, input().strip().split())
mn = min(n, m)
n -= mn
m -= mn
st = ''
for i in range(mn):
	st2 = str('10')
	st += st2
if n != 0:
	if n == 1:
		st = '0' + st
		print(st)
	else:
		print('-1')
else:
	ans = ''
	for i in range(0, len(st) - 1, 2):
		if m == 0:
			ans += st[i:]
			break
		if st[i] == '0' and st[i + 1] == '1':
			ans += '011'
			m -= 1
		elif st[i] == '1' and st[i + 1] == '0':
			ans += '110'
			m -= 1
		else:
			ans += st[i]
			ans += st[i + 1]
	if m == 0:
		print(ans)
	elif ans[-1] == '0':
		if m == 1:
			ans += '1'
			m -= 1
		elif m == 2:
			ans += '11'
			m -= 2
		if m != 0:
			print(-1)
		else:
			print(ans)


from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase

def main():

	def printAlternative(start):
		curr = start
		for i in range(ones + zeros):
			print(curr, end='')
			curr ^= 1
	(zeros, ones) = map(lambda x: int(x), input().split())
	if zeros - 1 <= ones <= (zeros + 1) * 2:
		if zeros > ones:
			printAlternative(0)
		elif ones == zeros or ones == zeros + 1:
			printAlternative(1)
		else:
			exceeded = ones - (zeros + 1)
			print(11, end='')
			exceeded -= 1
			for i in range(zeros):
				print(0, end='')
				if exceeded > 0:
					print(11, end='')
					exceeded -= 1
				else:
					print(1, end='')
		print()
	else:
		print(-1)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
input = lambda : sys.stdin.readline().rstrip('\r\n')

def print(*args, **kwargs):
	sep = kwargs.pop('sep', ' ')
	file = kwargs.pop('file', sys.stdout)
	atStart = True
	for x in args:
		if not atStart:
			file.write(sep)
		file.write(str(x))
		atStart = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
main()


import math

def lerp(val, lb, ub, lv, uv):
	return lv + (val - lb) * (uv - lv) / (ub - lb)

def get_ints():
	return list(map(int, input().split()))

def get_floats():
	return list(map(float, input().split()))
(M, N) = get_ints()
if N < M - 1 or N > 2 * (M + 1):
	print(-1)
	exit()
N -= M - 1
s = ''
for i in range(M - 1):
	s += '0'
	s += '1' + '1' * int(N > 0)
	if N > 0:
		N -= 1
s += '0'
if N == 1:
	s = '1' + s
elif N == 2:
	s = '11' + s
elif N == 3:
	s = '11' + s + '1'
elif N == 4:
	s = '11' + s + '11'
print(s)


def func(n, m):
	s = ''
	while n >= 1 and m >= 2 and (m >= n):
		s += '110'
		n -= 1
		m -= 2
	while n >= 1 and m >= 1:
		s += '10'
		n -= 1
		m -= 1
	if n == 0:
		if m == 1:
			m -= 1
			s = s + '1'
		elif m == 2:
			m -= 2
			s = s + '11'
	elif n == 1:
		if m == 1:
			m -= 1
			n -= 0
			s = s + '10'
		elif m == 0:
			n -= 1
			s = '0' + s
	if n == 0 and m == 0:
		return s
	return '-1'
a = [int(i) for i in input().split()]
n = a[0]
m = a[1]
print(func(n, m))


(z, o) = map(int, input().split())
if z - 1 <= o <= 2 * (z + 1):
	x = o - z - 1
	if z > o:
		s = 0
	else:
		s = 1
	z = o + z
	ans = []
	while z > 0:
		if s % 2 == 0:
			ans.append('0')
			s = 1
			z -= 1
		elif x <= 0:
			ans.append('1')
			z -= 1
			s = 0
		else:
			ans.append('1')
			ans.append('1')
			z -= 2
			x -= 1
			s = 0
	print(''.join(ans))
else:
	print(-1)


(n, m) = [int(x) for x in input().split()]
if n - m > 1 or m > 2 * n + 2:
	print(-1)
elif n > m:
	print('0', end='')
	print('10' * (n - 1))
elif m > 2 * n:
	if m % 2:
		print('1', end='')
		m -= 1
	else:
		print('11', end='')
		m -= 2
	m //= 2
	print('011' * m)
else:
	i = 0
	while m > n:
		n -= 1
		m -= 2
		print('110', end='')
	print('10' * n, end='')


def prob():
	(n, m) = [int(x) for x in input().split()]
	if (n + 1) * 2 < m or m < n - 1:
		print(-1)
	elif n >= m:
		print('01' * m + '0' * (n > m))
	else:
		print(('10' * n + '1').replace('1', '11', m - n - 1))
t = 1
for _ in range(0, t):
	prob()


from collections import Counter, defaultdict
from sys import stdin, stdout
input = stdin.readline
I = lambda : int(input())
M = lambda : map(int, input().split())
LI = lambda : list(map(int, input().split()))
(n, m) = M()
if n > m + 1 or m > 2 * n + 2:
	print(-1)
elif n >= m:
	print('01' * m + '0' * (n > m))
else:
	print(('10' * n + '1').replace('1', '11', m - n - 1))


num = list()
(m, n) = map(int, input().split())
if m - 1 <= n and n <= 2 * (m + 1):
	if m == n:
		num = ['10'] * m
	elif n == m - 1:
		num = ['01'] * n
		num.append('0')
	else:
		while m != 0 or n != 0:
			if n > m and m > 0:
				n -= 2
				m -= 1
				num.append('110')
			elif m == 0:
				num.append('1')
				n -= 1
			else:
				num.append('10')
				m -= 1
				n -= 1
	print(*num, sep='')
else:
	print(-1)


(n, m) = [int(x) for x in input().split()]
if n > m + 1:
	print(-1)
elif 2 * (n + 1) < m:
	print(-1)
else:
	out = ''
	while n > 0 or m > 0:
		if n == 0:
			out += '1' * m
			m = 0
		elif n > m:
			out += '0'
			n -= 1
		elif n == m:
			out += '10' * n
			n = m = 0
		else:
			out += '110'
			n -= 1
			m -= 2
	print(out)


(n, m) = map(int, input().split())
res = ''
if m > 2 * n + 2 or n - m > 1:
	print(-1)
else:
	while n > 0 and m > 0:
		if m >= n + 1:
			res += '110'
			m -= 2
			n -= 1
		else:
			res += '10'
			m -= 1
			n -= 1
	res += '1' * m
	if n > 0:
		res = '0' + res
print(res)


from sys import stdin, stdout
(x, y) = map(int, stdin.readline().split())
if x == y:
	print('10' * x)
elif x < y:
	if y <= 2 * x + 2:
		if y >= 2 * x:
			double = x
			single = y - 2 * x
			res = '110' * double + '1' * single
		else:
			double = y % x
			single = x - double
			res = '110' * double + '10' * single
		stdout.write(res + '\n')
	else:
		print(-1)
elif x > y + 1 or x < y - 1:
	print(-1)
else:
	res = '0' * (x - y) + '10' * y
	stdout.write(res + '\n')


(n, m) = map(int, input().split())
if m >= n - 1 and 2 * n + 2 >= m:
	s = []
	for i in range(n):
		s.append('10')
	f = ''
	if m <= n:
		t = n - m
		for i in range(m):
			f += s[i]
		print('0' * t + f)
	elif m > n and 2 * n >= m:
		for i in range(n, m):
			s[i % n] = '1' + s[i % n]
		print(''.join(s))
	elif m > 2 * n:
		t = m - 2 * n
		for i in range(n, m - t):
			s[i % n] = '1' + s[i % n]
		print(''.join(s) + '1' * t)
else:
	print(-1)


(n, m) = map(int, input().split())
if n > m + 1 or m > 2 * n + 2:
	print(-1)
elif n >= m:
	print('01' * m + '0' * (n > m))
else:
	print(('10' * n + '1').replace('1', '11', m - n - 1))


(n, m) = map(int, input().split())
l = []
if n - 1 <= m and m <= 2 * (n + 1):
	if m == n:
		l = ['10' for x in range(m)]
		print(''.join(l))
		exit()
	elif m == n - 1:
		l = ['01' for x in range(m)]
		l.append('0')
		print(''.join(l))
		exit()
	else:
		l = ['0'] * (m + n)
		count = m - (n + 1)
		i = 0
		step = 0
		while True:
			if count > 0 and step % 2 == 0:
				(l[i], l[i + 1]) = ('1', '1')
				count -= 1
				step += 1
				i += 2
			elif step % 2 == 0:
				l[i] = '1'
				step += 1
				i += 1
			else:
				l[i] = '0'
				i += 1
				step += 1
			if i == len(l):
				break
		print(''.join(l))
		exit()
else:
	print(-1)


(n, m) = map(int, input().split())
if n - 1 <= m <= 2 * (n + 1):
	m -= n - 1
	if m == 0:
		s = '0' + '10' * (n - 1)
	elif m - 1 <= n:
		s = '110' * (m - 1) + '10' * (n - m + 1)
	else:
		s = '110' * n + '1' * (m - 1 - n)
	print(s)
else:
	print(-1)


(n, m) = map(int, input().split())
l = n + m
if m > 2 * (n + 1) or n > m + 1:
	print('-1')
else:
	ans = []
	p = n
	q = m
	if p == q:
		for i in range(l):
			if i % 2:
				ans.append(0)
			else:
				ans.append(1)
	elif p > q:
		for i in range(l):
			if i % 2:
				ans.append(1)
			else:
				ans.append(0)
	else:
		for i in range(l):
			if m == n:
				break
			if i % 3 == 0 or i % 3 == 1:
				ans.append(1)
				m -= 1
			elif i % 3 == 2:
				ans.append(0)
				n -= 1
			if ans[i - 1] == 0:
				(x, y) = (1, 0)
			else:
				(x, y) = (0, 1)
		j = i
		while j < l:
			if m == 0 and n == 0:
				break
			if (j - i) % 2:
				ans.append(y)
				if y:
					m -= 1
				else:
					n -= 1
			else:
				ans.append(x)
				if x:
					m -= 1
				else:
					n -= 1
			j += 1
	print(''.join((str(elem) for elem in ans)))


(n, m) = list(map(int, input().split(' ')))
if n >= m + 2 or m > 2 * (n + 2):
	print(-1)
elif n == m + 1:
	print(''.join(['01'] * m + ['0']))
elif n == m:
	print(''.join(['01'] * m))
else:
	a = '110'
	b = '10'
	ans = None
	t = 0
	for c1 in range(3):
		for c2 in range(2):
			(x, y) = (m - c1 - n + c2, 2 * (n - c2) - (m - c1))
			if x >= 0 and x % 1 == 0 and (y >= 0) and (y % 1 == 0):
				ans = (c1, x, y, c2)
				t = 1
				break
		if t == 1:
			break
	if ans:
		(rem_1, x, y, rem_0) = (ans[0], ans[1], ans[2], ans[3])
		lst = rem_0 * ['0'] + [a] * x + [b] * y + rem_1 * ['1']
		ans = ''.join(lst)
		print(ans)
	else:
		print(-1)


(n, m) = map(int, input().split())
if m > 2 * n + 2:
	print(-1)
elif m < n - 1:
	print(-1)
elif m == 2 * n + 2:
	print('110' * n + '11')
elif m == 2 * n + 1:
	print('110' * n + '1')
elif m == 2 * n:
	print('110' * n)
elif m == n - 1:
	print('01' * m + '0')
elif m == n:
	print('01' * m)
else:
	t = m - n
	print('110' * (m - n) + '10' * (2 * n - m))


(zero, um) = map(int, input().split())
if um > zero * 2 + 2 or zero - 1 > um:
	print(-1)
else:
	r = ''
	if zero >= um:
		while um > 0:
			r += '01'
			(zero, um) = (zero - 1, um - 1)
		if zero > 0:
			r += '0'
		r = r[::-1]
	else:
		while um - 1 > zero and um > 2 and (zero > 0):
			r += '110'
			um -= 2
			zero -= 1
		while zero > 0:
			r += '10'
			um -= 1
			zero -= 1
		while um > 0:
			r += '1'
			um -= 1
	print(r)


import sys
import math
from collections import defaultdict

def solve(test):
	(n, m) = map(int, input().split())
	res = []
	if m > 2 * n + 2 or m < n - 1:
		print(-1)
	elif n - m == 1:
		ans = ['0', '1'] * m + ['0']
		print(''.join(ans))
	else:
		while n and m:
			res.append(1)
			res.append(0)
			n -= 1
			m -= 1
		if m:
			res.append(1)
			m -= 1
		for i in range(0, len(res), 2):
			if m == 0:
				break
			res[i] = 2
			m -= 1
		ans = []
		for i in range(len(res)):
			if res[i] == 2:
				ans.append(str(1))
				ans.append(str(1))
			elif res[i] == 1:
				ans.append(str(1))
			else:
				ans.append(str(0))
		print(''.join(ans))
test_cases = 1
for t in range(1, test_cases + 1):
	solve(t)


(k, n) = input().split(' ')
k = int(k)
n = int(n)
if k > n and k - n > 1 or n - 2 * k > 2:
	print('-1', end='')
	exit()
if k > n:
	print('0', end='')
	for i in range(n):
		print('10', end='')
	exit()
while n != 0 or k != 0:
	if n > k and k != 0:
		print('110', end='')
		n = n - 2
		k = k - 1
	elif n == k:
		for i in range(n):
			print('10', end='')
		exit()
	else:
		print('1', end='')
		n = n - 1


(n, m) = map(int, input().split())
if m < n - 1 or m > 2 * (n + 1):
	print(-1)
elif n - m >= 0 and n - m <= 1:
	for i in range(m):
		print('01', end='')
		(n, m) = (n - 1, m - 1)
	if n - m > 0:
		print('0')
else:
	while m > 0:
		print('11', end='')
		m -= 2
		if n > 0:
			print('0', end='')
			n -= 1
		if m > 0 and m - n >= 0 and (m - n <= 1):
			for i in range(n):
				print('10', end='')
				(n, m) = (n - 1, m - 1)
			if m - n > 0:
				print('1')
				m -= 1


(n, m) = map(int, input().split())
if n > m + 1:
	print(-1)
	exit(0)
if n == m:
	print('10' * n)
	exit(0)
if n == m + 1:
	print('0' + '10' * m)
	exit(0)
if m > 2 * n + 2:
	print(-1)
	exit(0)
ans = ''
while n > 0 and m > 0 and (n != m):
	ans += '110'
	n -= 1
	m -= 2
if m == 2 and n == 0:
	print(ans + '11')
elif n == 1 and m == 0:
	print('0' + ans)
elif m == n:
	print(ans + '10' * m)
elif m == 1:
	print(ans + '1')


(n, m) = input().split()
n = int(n)
m = int(m)
s = 0
ss = ''
if m > 2 * n + 2 or n > m + 1:
	print(-1)
elif m == n - 1:
	ss = '0' + '10' * (n - 1)
	print(ss)
elif m == n:
	ss = '10' * n
	print(ss)
else:
	t = m - n - 1
	ss = '110' * t
	tt = int((n + m - 3 * t - 1) / 2)
	ss += '10' * tt + '1'
	print(ss[:n + m])


(n, m) = map(int, input().split())
ans = 0
if m > n * 2 + 2 or m < n - 1:
	print(-1)
else:
	if m == n - 1:
		ans = '0' + m * '10'
	elif m <= 2 * n:
		ans = (m - n) * '110' + (2 * n - m) * '10'
	elif 2 * n < m <= 2 * n + 2:
		ans = n * '110' + (m - 2 * n) * '1'
	print(ans)


(n, m) = map(int, input().split())
if n - 1 <= m <= 2 * (n + 1):
	s = ''
	m -= n - 1
	d = min(m, 2)
	s += '1' * d + '0'
	m -= d
	for i in range(n - 1):
		if m:
			s += '1'
			m -= 1
		s += '10'
	if m:
		s += '1' * m
	print(s)
else:
	print(-1)


import sys
input = sys.stdin.readline
f = lambda : map(int, input().split())
(n, m) = f()
if n - 1 <= m <= 2 * (n + 1):
	if m == n - 1:
		print('01' * m + '0')
	elif m == n:
		print('01' * m)
	elif m >= 2 * n:
		print('110' * n + '1' * (m - 2 * n))
	else:
		print('110' * (m % n) + '10' * (n - m % n))
else:
	print(-1)


import sys
input = sys.stdin.readline
import math as mt
import collections as cc

def ncr(n, r):
	import math as mt
	return mt.factorial(n) // (mt.factorial(n - r) * mt.factorial(r))
I = lambda : list(map(int, input().split()))
(n, m) = I()
if m > n * 2 + 2:
	print(-1)
elif n > m + 1:
	print(-1)
elif n >= m:
	new = ''
	new = '01' * m
	print(new + '0' if n > m else new)
else:
	new = '10' * n + '1'
	new = new.replace('1', '11', m - n - 1)
	print(new)


(n, m) = [int(x) for x in input().split()]
if m > 2 * n + 2:
	print(-1)
elif m < n - 1:
	print(-1)
elif m == n - 1:
	s = '01' * (n - 1) + '0'
	print(s)
elif m == n:
	s = '10' * n
	print(s)
else:
	x = n + 1
	y = m - x
	s = '110' * y
	if y == n + 1:
		print('110' * n + '11')
	elif y == n:
		print('110' * n + '1')
	else:
		print(s + '10' * (n - y) + '1')


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
(n, m) = iia()
res = ''
if m < n - 1 or 2 * n < m - 2:
	print('-1')
elif n > m:
	print('01' * m + '0')
elif n == m:
	print('01' * m)
else:
	print(('10' * n + '1').replace('1', '11', m - n - 1))


from sys import stdin
(n, m) = list(map(int, stdin.readline().split()))
if m + 1 >= n and m <= 2 * n + 2:
	if m > n:
		while m > n and m >= 2 and (n >= 1):
			print(110, end='')
			m -= 2
			n -= 1
		while m > 0 and n > 0:
			print(10, end='')
			m -= 1
			n -= 1
		while m > 0 and m <= 2:
			print(1, end='')
			m -= 1
	else:
		while m > 0 and n > 0:
			print('01', end='')
			m -= 1
			n -= 1
		if n > 0 and n == 1:
			print(0)
else:
	print(-1)


(n, m) = map(int, input().split())
if not (m <= 2 * (n + 1) and m >= n - 1):
	print(-1)
	quit()
else:
	ma = max(min(m - n, n), 0)
	print('1' * (m - n * 2) + '011' * ma + (min(n, m) - ma) * '01' + '0' * (n > m))


(n, m) = map(int, input().split())
if n - m > 1 or m > (n + 1) * 2:
	print(-1)
elif m // 2 >= n:
	san = ['110'] * n
	san = san + ['1'] * (m - 2 * n)
	print(''.join(san))
elif n >= m:
	san = ['01'] * m
	if n > m:
		san.append('0')
	print(''.join(san))
else:
	k = m - n - 1
	san = ['110'] * k
	san = san + ['10'] * (n - k) + ['1']
	print(''.join(san))


(n, m) = map(int, input().split())
if m < n - 1 or m > (n + 1) * 2:
	print(-1)
elif m == n - 1:
	print('01' * m + '0')
elif m == n:
	print('01' * m)
elif m == n + 1:
	print('1' + '01' * n)
else:
	s = '1' + '01' * n
	res = ''
	c = 0
	i = 0
	while i < len(s):
		if s[i] == '1':
			res = res + '11'
			c = c + 1
			if c == m - (n + 1):
				break
		else:
			res = res + '0'
		i = i + 1
	res = res + s[i + 1:len(s)]
	print(res)


def team(n, m):
	pm = int(m / 2)
	rm = m % 2
	if pm == n:
		ans = ['110'] * pm
		if rm == 1:
			ans.append('1')
		print(''.join(ans))
	elif n + 1 == pm:
		if rm == 0:
			ans = ['110'] * n
			ans.append('11')
			print(''.join(ans))
		else:
			print(-1)
	elif pm + 1 == n:
		ans = ['011'] * pm
		ans.append('0')
		if rm == 1:
			ans.append('1')
		print(''.join(ans))
	elif n > pm and n <= m:
		ans = ['110'] * (2 * pm - n)
		ans.extend(['1010'] * (n - pm))
		if rm == 1:
			ans.append('1')
		print(''.join(ans))
	elif n - 1 == m:
		ans = ['01'] * m
		ans.append('0')
		print(''.join(ans))
	else:
		print(-1)
(n, m) = map(int, input().split())
team(n, m)


getInput = str(input())
arr1 = getInput.split()
num0 = int(arr1[0])
num1 = int(arr1[1])
no1 = num0
no0 = num1
if num0 > num1 and num0 > num1 + 1:
	print(-1)
elif num1 == num0:
	print('10' * num1)
elif num1 > num0 * 2 + 2:
	print('-1')
elif num1 > num0:
	ans = ''
	diff = num1 - num0
	diff2 = diff
	if diff2 > 10:
		diff2 -= 3
	if num0 >= diff2 and num1 >= diff2:
		ans += '110' * diff2
		num1 -= diff2 * 2
		num0 -= diff2
	while num1 > num0:
		if num1 == num0:
			break
		if num1 < 2 or num0 == 0:
			break
		ans += '110'
		num1 -= 2
		num0 -= 1
		if num0 == 0:
			break
	if num1 == num0:
		ans += '10' * num1
	else:
		ans += '1' * num1
	print(ans)
else:
	ans = '01' * num1
	ans += '0'
	print(ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(n, m) = LI()
	if n > m + 1 or m > n * 2 + 2:
		return -1
	r = []
	if n == m + 1:
		for i in range(m):
			r.append(0)
			r.append(1)
		r.append(0)
	else:
		for i in range(n):
			if m > n:
				r.append(1)
				m -= 1
			r.append(1)
			r.append(0)
			m -= 1
			n -= 1
		for i in range(m):
			r.append(1)
	return ''.join(map(str, r))
print(main())


(z, o) = list(map(int, input().split()))
if o + 1 < z or o > 2 * (z + 1):
	print(-1)
elif z == o + 1:
	print('01' * (z - 1) + '0')
elif z == o:
	print('10' * z)
elif o == z + 1:
	print('10' * z + '1')
elif o > z + 1 and o < 2 * (z + 1):
	print('110' * (o - z - 1) + '10' * (2 * z - o + 1) + '1')
elif o == 2 * (z + 1):
	print('110' * z + '11')


import sys
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 998244353
(n, m) = Ri()
if m > n:
	ans = []
	while n - 1 >= 0 and m - 2 >= 0 and (n != m):
		ans.append('11')
		ans.append('0')
		m -= 2
		n -= 1
	while n > 0 and m > 0:
		ans.append('1')
		ans.append('0')
		m -= 1
		n -= 1
	if n > 1 or m > 2:
		print(-1)
	else:
		if n == 1:
			ans = ['0'] + ans
		elif m == 2:
			ans = ans + ['1', '1']
		elif m == 1:
			ans = ans + ['1']
		print(''.join(ans))
else:
	ans = []
	while m > 0:
		ans.append('0')
		ans.append('1')
		m -= 1
		n -= 1
	if n > 1:
		print(-1)
	else:
		if n == 1:
			ans = ans + ['0']
		print(''.join(ans))


import sys
import math

def fn(n, m):
	l = [str(0)] * (n + m)
	if m > 2 * (n + 1) or n > m + 1:
		print(-1)
		return 0
	elif n == m:
		for i in range(n + m):
			if i % 2 == 0:
				l[i] = str(1)
	elif m > n:
		z = 0
		k = 0
		for i in range(m - n - 1):
			l[z] = str(1)
			l[z + 1] = str(1)
			z = z + 3
			k = z
		for j in range(k, n + m):
			if j % 2 == k % 2:
				l[j] = str(1)
			else:
				l[j] = str(0)
	else:
		for i in range(n + m):
			if i % 2 != 0:
				l[i] = str(1)
	print(''.join(l))
input = sys.stdin.read()
data = list(map(int, input.split()))
n = data[0]
m = data[1]
fn(n, m)


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
(zero, one) = int_array()
if one > 2 * (zero + 1) or one < zero - 1:
	print(-1)
elif zero >= one:
	print('01' * one + '0' * (zero > one))
else:
	print(('10' * zero + '1').replace('1', '11', one - zero - 1))


l = list(map(int, input().split()))
n = l[0]
m = l[1]
if n * 2 < m - 2 or m + 1 < n:
	print(-1)
else:
	s = ''
	R = 0
	if n > m:
		n = m
		s += '0'
		R += 1
	q = m - n
	e = 0
	if q > n:
		e = q - n
		m -= e
		q -= e
	s += q * '110'
	m = m - 2 * q
	n = n - q
	s += n * '10'
	s += e * '1'
	print(s)


(n, m) = map(int, input().split())
if m < n - 1 or m > 2 * n + 2:
	print('-1')
else:
	if m >= 2 * n:
		s = ''
		for i in range(n):
			s = s + '11'
			s = s + '0'
		diff = m - 2 * n
		if diff == 1:
			s = s + '1'
		elif diff == 2:
			s = s + '11'
		else:
			s = s
	elif m >= n - 1 and m < 2 * n:
		s = ''
		for i in range(n):
			s = s + '1'
			s = s + '0'
		if m == n - 1:
			s = s[1:]
		else:
			diff = n - (2 * n - m)
			l = list(s)
			for i in range(len(l)):
				if diff > 0:
					if l[i] == '1':
						l[i] = '11'
						diff -= 1
			s = ''.join(l)
	print(s)


(n, m) = map(int, input().split())
s = []
if not (n - 1 <= m and m <= 2 * (n + 1)):
	print(-1)
	exit()
if m == n - 1:
	print('01' * m + '0')
elif m == n:
	print('01' * n)
elif 2 * n + 2 == m:
	print('110' * n + '11')
else:
	t = m - n - 1
	print('110' * t + '10' * (n - t) + '1')


(n, m) = map(int, input().split())
if m >= 2 * n + 3 or n > m + 1:
	print(-1)
elif n == m:
	print('10' * n)
elif n == m + 1:
	print('0' + '10' * m)
elif m == 2 * n:
	print('110' * n)
else:
	ans = ''
	while True:
		if n == 0 or n == m:
			break
		ans += '110'
		n -= 1
		m -= 2
	if n == m:
		ans += '10' * n
	elif n == 0 and m != 0:
		ans += m * '1'
	else:
		ans = -1
	print(ans)


from sys import stdin, stdout

def INI():
	return int(stdin.readline())

def INL():
	return [int(_) for _ in stdin.readline().split()]

def INS():
	return stdin.readline()

def MOD():
	return pow(10, 9) + 7

def OPS(ans):
	stdout.write(str(ans) + '\n')

def OPL(ans):
	[stdout.write(str(_) + ' ') for _ in ans]
	stdout.write('\n')
(n, m) = INL()
ans = ''
if m + 1 < n or (m + 1) // 2 - 1 > n:
	OPS(-1)
else:
	if n == m + 1:
		ans += '01' * m + '0'
	else:
		x = min(m - n, n)
		ans += '110' * min(m - n, n)
		n -= x
		m -= 2 * x
		if n == 0:
			ans += '1' * m
		else:
			ans += '10' * m
	OPS(ans)


def solve(count0, count1):
	if count1 < count0 - 1:
		return -1
	if count0 - 1 == count1:
		return '01' * (count0 - 1) + '0'
	ans = ''
	while count0 > 0:
		if count0 == count1:
			if ans and ans[-1] == '0':
				ans += '10' * count0
			else:
				ans += '01' * count0
			count0 = count1 = 0
			break
		elif count1 >= 2:
			ans += '11'
			count1 -= 2
		elif count1 == 1:
			ans += '1'
			count1 -= 1
		else:
			return -1
		ans += '0'
		count0 -= 1
	if count1 >= 3:
		return -1
	else:
		ans += '1' * count1
	return ans
A = list(map(int, input().split()))
print(solve(A[0], A[1]))


(n, m) = map(int, input().split())
if n > m + 1 or m > 2 * n + 2:
	print(-1)
elif n == m + 1:
	print('01' * m + '0')
elif n == m:
	print('01' * m)
elif m == 2 * n + 2:
	print('110' * n + '11')
else:
	a = m - n - 1
	b = n - a
	print('1' + '101' * a + '01' * b)


inputlist = list(map(int, input().split()))
zeroes = inputlist[0]
ones = inputlist[1]
if ones < zeroes - 1 or ones > 2 * (zeroes + 1):
	print(-1)
else:
	anstr = ''
	if ones <= 2 * (zeroes - 1):
		for i in range(ones - (zeroes - 1)):
			anstr += '011'
		for j in range(2 * (zeroes - 1) - ones):
			anstr += '01'
		anstr += '0'
	elif ones == 2 * zeroes:
		for j in range(zeroes):
			anstr += '011'
	elif ones == 2 * zeroes - 1:
		for j in range(zeroes - 1):
			anstr += '011'
		anstr += '01'
	elif ones == 2 * zeroes + 1:
		anstr += '1'
		for j in range(zeroes):
			anstr += '011'
	else:
		anstr += '11'
		for j in range(zeroes):
			anstr += '011'
	print(anstr)


(n, m) = map(int, input().split())
if m - n < -1:
	print(-1)
elif m > 2 * n + 2:
	print(-1)
else:
	b = n - 1
	p = max(0, m - n + 1)
	l = min(n - 1, p)
	b -= l
	k = max(0, p - l)
	h = min(2, k)
	k -= h
	g = min(2, k)
	print('1' * h + '0' + '10' * b + '110' * l + '1' * g)


(zeros, ones) = map(int, input().split())
if zeros - 2 >= ones or ones - 2 > 2 * zeros:
	print(-1)
else:
	if zeros > ones:
		solution = ['0', '1'] * ones
		solution.append('0')
	elif zeros == ones:
		solution = ['0', '1'] * ones
	elif ones // zeros > 1:
		solution = ['1', '1', '0'] * zeros
		solution.extend(['1'] * (ones - 2 * zeros))
	else:
		solution = ['1', '1', '0'] * (ones % zeros)
		solution.extend(['1', '0'] * (zeros - ones % zeros))
		solution.extend(['1'] * (ones - ones % zeros - zeros))
	print(''.join(solution))


from sys import stdin, stdout
(z, o) = [int(x) for x in stdin.readline().split()]
if o > (z + 1) * 2 or o < z - 1:
	stdout.write('-1\n')
elif o == z - 1 or o == z:
	if o == z - 1:
		for j in range(0, o):
			stdout.write('0')
			stdout.write('1')
		stdout.write('0')
	elif o == z:
		for j in range(0, o):
			stdout.write('1')
			stdout.write('0')
else:
	o = o - (z + 1)
	for i in range(0, 2 * z + 1):
		if i % 2 == 0 and o:
			stdout.write('11')
			o -= 1
		elif i % 2 != 0:
			stdout.write('0')
		else:
			stdout.write('1')


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
(n0, n1) = f()
s = '0' * (n0 + n1)
if n1 < n0 - 1:
	print(-1)
elif n1 == n0 - 1 or n1 == n0:
	s = s.replace('0', '01')
	print(s[:n0 + n1])
elif n1 == n0 + 1:
	s = s.replace('0', '10')
	print(s[:n0 + n1])
elif n1 > n0 + 1 and n1 <= 2 * (n0 + 1):
	s = s.replace('0', '10')
	s = s[:2 * n0 + 1]
	s = s.replace('1', '11', n1 - n0 - 1)
	print(s[:n0 + n1])
else:
	print(-1)


import math, sys, bisect, heapq
from collections import defaultdict, Counter, deque
from itertools import groupby, accumulate
int1 = lambda x: int(x) - 1
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))
ilelec = lambda : map(int1, input().split())
alelec = lambda : list(map(int1, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]
MOD = 1000000000 + 7

def Y(c):
	print(['NO', 'YES'][c])

def y(c):
	print(['no', 'yes'][c])

def Yy(c):
	print(['No', 'Yes'][c])
(n, m) = ilele()
A = ['']
for i in range(m):
	A.append('1')
	A.append('')
i = 4
zero = n
while i < len(A) - 1 and zero:
	A[i] = '0'
	zero -= 1
	i += 4
i = 2
while i < len(A) - 1 and zero:
	A[i] = '0'
	zero -= 1
	i += 4
if zero:
	A[0] = '0'
	zero -= 1
if zero:
	A[-1] = '0'
	zero -= 1
if zero:
	print(-1)
	exit(0)
ans = ''.join(A)
if '00' in ans or '111' in ans:
	print(-1)
else:
	print(ans)


(m, n) = input().split()
n = int(n)
m = int(m)
r = '01' * (m - 1) + '0'
if n == m - 1:
	print(r)
elif n == m:
	print('1' + r)
elif n == m + 1:
	print('1' + r + '1')
elif 2 * m - 1 >= n > m + 1:
	s = '11' + '011' * (n - m - 1)
	q = '01' * (2 * m - n) + '0'
	print(s + q)
elif 2 * (m + 1) >= n >= 2 * m:
	s = '11' + '011' * (n - m + 1)
	print(s[:n + m])
else:
	print('-1')


def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def MAP2():
	return map(float, input().split())

def LIST():
	return list(map(int, input().split()))

def STRING():
	return input()
import string
import sys
from heapq import heappop, heappush, heapify
from bisect import *
from collections import deque, Counter, defaultdict
from math import *
from itertools import permutations, accumulate
dx = [-1, 1, 0, 0]
dy = [0, 0, 1, -1]
[z, o] = LIST()
places = z - 1
if o > 2 * places + 4 or o < places:
	print(-1)
elif places == 0:
	x = '0'
	for i in range(1, o + 1):
		if i <= 2:
			x = '1' + x
		else:
			x = x + '1'
	print(x)
else:
	tp = 0
	if o > 2 * places:
		tp = o - 2 * places
		o = o - tp
	mid = o // places
	till = o % places
	if mid == 1:
		x = '110' * till
		x = '0' + x
		for i in range(till + 1, places + 1):
			x += '10'
		for i in range(1, tp + 1):
			if i <= 2:
				x = '1' + x
			else:
				x = x + '1'
		print(x)
	else:
		x = '110' * places
		x = '0' + x
		for i in range(1, tp + 1):
			if i <= 2:
				x = '1' + x
			else:
				x = x + '1'
		print(x)


def solver(n, m):
	if n > m + 1 or m > 2 * (n + 1):
		print(-1)
		return 1
	if m + 1 == n:
		print('01' * m + '0')
		return 1
	if m == n:
		print('01' * n)
		return 1
	if m == 2 * n + 2:
		print('110' * n + '11')
		return 1
	sblm = m - n - 1
	res = ''
	res = res + '110' * sblm
	res = res + '10' * (n - sblm)
	res = res + '1'
	print(res)
	return 1
(n, m) = map(int, input().split(' '))
solver(n, m)


def main():
	(n, m) = map(int, input().split())
	if n > m + 1 or m > (n + 1) * 2:
		print(-1)
	elif n > m:
		print('01' * m + '0')
	elif m > n * 2:
		print('110' * n + '1' * (m - n * 2))
	else:
		print('110' * (m - n) + '10' * (n * 2 - m))
main()


(n, m) = [int(x) for x in input().split()]
if m > n:
	sub = min(m - n, n)
	ans = '110' * sub
	m -= sub * 2
	n -= sub
	if n == m:
		print(ans + '10' * m)
	elif m > 2:
		print(-1)
	else:
		print(ans + '1' * m)
elif m < n:
	if m != n - 1:
		print(-1)
	else:
		print('01' * m + '0')
else:
	print('10' * n)


import math
from collections import defaultdict
(n, m) = map(int, input().split())
if n < math.ceil(m / 2) - 1:
	print(-1)
	exit()
elif m < n - 1:
	print(-1)
	exit()
cards = list()
if m > n:
	while m:
		if m - 2 >= n - 1 and m > 2:
			cards.append('11')
			m -= 2
		elif m - 1 >= n - 1:
			cards.append('1')
			m -= 1
		if n:
			cards.append('0')
			n -= 1
else:
	while n:
		if m == 0:
			cards.append('0')
		else:
			cards.append('01')
		n -= 1
		m -= 1
print(''.join(cards))


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass
(n, m) = map(int, input().split())
if n > m + 1 or m > 2 * n + 2:
	print(-1)
elif n >= m:
	print('01' * m + '0' * (n > m))
else:
	print(('10' * n + '1').replace('1', '11', m - n - 1))
endtime = time.time()


def Team(n, m):
	result = ''
	while n > 0 or m > 0:
		if m > n:
			if n > 0:
				result += '110'
				n -= 1
				m -= 2
			elif n == 0:
				if m == 2:
					result += '11'
					n -= 1
					m -= 2
				elif m == 1:
					result += '1'
					n -= 1
					m -= 1
				else:
					return -1
			else:
				return -1
		elif m == n:
			if n > 0:
				result += '10'
				n -= 1
				m -= 1
			else:
				return -1
		elif n == m + 1:
			result += '010'
			n -= 2
			m -= 1
		else:
			return -1
	if n <= 0 and m > 0 or (m <= 0 and n > 0):
		return -1
	return result
(n, m) = [int(x) for x in input().split()]
result = Team(n, m)
print(result)


(n, m) = list(map(int, input().split()))
t = ''
f = 0
if n - m == 1:
	print('0' + '10' * m)
elif n == m:
	print('10' * n)
else:
	while n != 0 or m != 0:
		if m < n + 1 or m > 2 * n + 2:
			f = 1
			print('-1')
			break
		elif n > 0 and m >= n + 2:
			t = t + '110'
			m = m - 2
			n = n - 1
		elif n > 0 and m >= n + 1:
			t = t + '10'
			m = m - 1
			n = n - 1
		elif n == 0 and m == 1:
			t = t + '1'
			m = m - 1
		elif n == 0 and m == 2:
			t = t + '11'
			m = m - 2
		else:
			continue
	if f == 0:
		print(t)


def p(n, m):
	s = []
	for i in range(n + m):
		if i & 1 == 0:
			s.append('0')
		else:
			s.append('1')
	return s
(n, m) = map(int, input().split())
flag = 0
s = []
if n == m + 1 or n == m:
	s = p(n, m)
elif n - 1 <= m <= (n + 1) * 2:
	c = 0
	while m != 0 or n != 0:
		diff = m - n
		if n == m + 1 or n == m:
			k = p(n, m)
			for i in k:
				s.append(i)
			break
		if c & 1 == 0:
			if diff >= 2:
				s.append('1' * 2)
				m -= 2
			else:
				s.append('1' * diff)
				m -= diff
		else:
			s.append('0')
			n -= 1
		c += 1
else:
	flag = 1
	print(-1)
if not flag:
	print(''.join(s))


(n, m) = map(int, input().split())
if n > m + 1:
	exit(print(-1))
elif m > 2 * (n + 1):
	exit(print(-1))
elif n == m + 1:
	exit(print('01' * m + '0'))
a = []
while n < m and n > 0:
	a.append('11')
	a.append('0')
	n -= 1
	m -= 2
if n != 0:
	a.append('10' * n)
else:
	a.append('1' * m)
print(''.join(a))


(a, b) = map(int, input().split())
if a == b:
	L = [['1', '0'][k % 2] for k in range(a * 2)]
	print(''.join(L))
elif b < a:
	if b == a - 1:
		L = [['0', '1'][k % 2] for k in range(b * 2)]
		L += ['0']
		print(''.join(L))
	else:
		print(-1)
elif b == a + 1:
	L = [['1', '0'][k % 2] for k in range(a * 2)]
	L += ['1']
	print(''.join(L))
else:
	b = b - a
	if a >= b:
		L = [['1', '0'][k % 2] for k in range(a * 2)]
		for k in range(b):
			L[k * 2] = '11'
		print(''.join(L))
	elif b == a + 1:
		L = [['1', '0'][k % 2] for k in range(a * 2)]
		for k in range(b - 1):
			L[k * 2] = '11'
		L += ['1']
		print(''.join(L))
	elif b == a + 2:
		L = [['1', '0'][k % 2] for k in range(a * 2)]
		for k in range(b - 2):
			L[k * 2] = '11'
		L += ['11']
		print(''.join(L))
	else:
		print(-1)


(z, o) = map(int, input().split())
if z > o + 1 or o > (z + 1) * 2:
	print('-1')
elif z > o:
	for i in range(z - 1):
		print('01', end='')
	print('0')
elif z == o:
	for i in range(z):
		print('10', end='')
else:
	r = o - z - 1
	for i in range(z):
		if r > 0:
			print('110', end='')
			r -= 1
		else:
			print('10', end='')
	print('11' if r > 0 else '1', end='')


def team(n, m):
	if m > 2 * n + 2 or m < n - 1:
		return -1
	ans = []
	if n > m:
		ans.append('0')
		n -= 1
	while m > n and m > 0 and (n > 0):
		if m > 0:
			ans.append('1')
			m -= 1
		if m > 0:
			ans.append('1')
			m -= 1
		if n > 0:
			ans.append('0')
			n -= 1
	while m > 0 and n > 0:
		ans.append('1')
		m -= 1
		ans.append('0')
		n -= 1
	while m > 0:
		ans.append('1')
		m -= 1
	while n > 0:
		ans.append('0')
		n -= 1
	return ''.join(ans)
(n, m) = map(int, input().strip().split())
print(team(n, m))


(z, o) = map(int, input().split())
if z > o + 1 or o > (z + 1) * 2:
	print(-1)
	exit()
if z == o:
	print(''.join(['10'] * z))
	exit()
elif z > o:
	if z - o > 1:
		print(-1)
		exit()
	print('01' * o + '0')
elif o > z * 2:
	print('110' * z + '1' * (o - z * 2))
else:
	print('110' * (o - z) + '10' * (2 * z - o))


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import sys
import math
from math import gcd
import sys
(n, k) = map(int, input().split())
ze = n
one = k
s = []
if k < n - 1:
	print(-1)
	exit()
var = k - (n - 1)
for i in range(n):
	if i == n - 1:
		s.append('0')
	elif var > 0:
		s.append('011')
		var -= 1
	else:
		s.append('01')
if var == 4:
	s = ['11'] + s
	s.append('11')
	print(''.join(s))
elif var >= 2 and var < 4:
	s = ['11'] + s
	var -= 2
	s.append('1' * var)
	print(''.join(s))
elif var > 4:
	print(-1)
else:
	s.append('1' * var)
	print(''.join(s))


(n, m) = map(int, input().split())
if m < n - 1 or m > 2 * (n + 1):
	print(-1)
elif m == n - 1:
	ans = ''
	for i in range(m):
		ans += '01'
	ans += '0'
	print(ans)
else:
	k = m // (n + 1)
	a = ''
	b = ''
	ans = ''
	for i in range(k):
		a = a + '1'
		b = b + '1'
	b = b + '1'
	b = b + '0'
	a = a + '0'
	m = m % (n + 1)
	i = 0
	while i < m:
		ans += b
		i += 1
	while i < n:
		ans += a
		i += 1
	for i in range(k):
		ans += '1'
	print(ans)


from math import ceil
(num0, num1) = map(int, input().split())
if num0 < ceil(num1 / 2) - 1 or num0 > num1 + 1:
	print(-1)
else:
	b = '10'
	if num1 == num0:
		print(b * num0)
	elif num1 == num0 - 1:
		print('0' + b * num1)
	else:
		ans = list(b * num0 + '1')
		num1r = num1 - num0 - 1
		i = 0
		d = 0
		while d < num1r:
			if ans[i] == '1':
				ans[i] += '1'
				d += 1
			i += 1
		print(''.join(ans))


(zero, one) = map(int, input().split())
if one > 2 * (zero + 1) or zero > one + 1:
	print(-1)
elif zero == one + 1:
	print('01' * one + '0')
elif zero == one:
	print('10' * zero)
elif one == zero + 1:
	print('10' * zero + '1')
elif one == 2 * (zero + 1):
	print('110' * zero + '11')
else:
	print('110' * (one - zero - 1) + '10' * (2 * zero - one + 1) + '1')


(a, b) = map(int, input().split())
if a * 2 < b - 2 or a - b >= 2:
	print(-1)
else:
	s1 = '110'
	s2 = '10'
	ans = ''
	while b - a > 1 and a > 0 and (b > 0):
		t = (b - a) // 2
		b -= 2 * t
		a -= t
		ans += s1 * t
	ans += s2 * min(a, b)
	if a - b == 1:
		ans = '0' + ans
	elif b - a:
		ans += '1' * (b - a)
	print(ans)


input_ = list(map(int, input().split()))
(n, m) = (input_[0], input_[1])
if n > m + 1 or m > 2 * n + 2:
	print(-1)
else:
	start_string = ''
	(n_count, m_count) = (n, m)
	if n_count > m_count:
		for i in range(m_count):
			start_string += '01'
		start_string += '0'
	else:
		while m_count > n_count and n_count > 0:
			start_string += '110'
			n_count -= 1
			m_count -= 2
		if n_count == m_count:
			for i in range(n_count):
				start_string += '10'
		elif n_count == 0:
			if m_count == 2:
				start_string += '11'
			else:
				start_string += '1'
		else:
			start_string = start_string[1:]
			start_string = '0' + start_string
			for i in range(n_count - 1):
				start_string += '10'
	print(start_string)


def zip_sorted(a, b):
	(a, b) = zip(*sorted(zip(a, b)))
	sorted(zip(a, b), key=lambda x: x[1])
	return (a, b)
import sys
input = sys.stdin.readline
I = lambda : list(map(int, input().split()))
S = lambda : list(map(str, input().split()))
(n, m) = I()
a = ['0'] * (2 * n - 1)
for i in range(len(a)):
	if i % 2 != 0:
		a[i] = '1'
if m < n - 1 or m > 2 * (n + 1):
	print(-1)
elif m == n - 1:
	print(''.join(a))
elif m == n:
	print('1' + ''.join(a))
elif m == n + 1:
	a = ['1'] + a + ['1']
	print(''.join(a))
else:
	a = ['1'] + a + ['1']
	whole = m - (n + 1)
	for j in range(0, len(a), 2):
		if whole > 0:
			pass
		else:
			break
		if a[j] == '1':
			a[j] = '11'
			whole = whole - 1
	print(''.join(a))


(n, m) = map(int, input().split())
if n - 1 <= m and m <= 2 * (n + 1):
	x = min(n, m)
	s = ['10' for x in range(x)]
	m -= x
	n -= x
	l = []
	ans = ''
	for d in s:
		if m > 0:
			l.append('1')
			m -= 1
		l.append(d)
	l.append('1' * m)
	print('0' * n, ''.join((x for x in l)), sep='')
else:
	print(-1)


import sys
import math as mt
input = sys.stdin.buffer.readline
t = 1
for __ in range(t):
	(n, m) = map(int, input().split())
	s = ''
	if n == m:
		for i in range(n):
			print('10', end='')
	elif n >= m // 2 - 1 + m % 2 and n <= m + 1:
		ch = 0
		if m + 1 == n:
			ch = 1
		while n > 0 or m > 0:
			ex = n - (m // 2 - 1)
			if ex > 0:
				if ch == 1:
					if n > 0:
						print('0', end='')
						n -= 1
					if m > 0:
						m -= 1
						print('1', end='')
				else:
					if m > 0:
						m -= 1
						print('1', end='')
					if n > 0:
						print('0', end='')
						n -= 1
			else:
				if m > 0:
					print('1', end='')
					m -= 1
				if m > 0:
					print('1', end='')
					m -= 1
				if n > 0:
					print('0', end='')
					n -= 1
	else:
		print(-1)


(n, m) = list(map(int, input().split()))
if m > (n + 1) * 2 or m < n - 1:
	print(-1)
else:
	a = '10' * n
	p = m - n
	s = ''
	i = 0
	if p < 0:
		print(a[1:])
	elif p == 0:
		print(a)
	else:
		v = min(n, p)
		s = '110' * v
		vl = p - v
		vn = n - v
		if vl > 0:
			s += '1' * vl
		if vn > 0:
			s += '10' * vn
		print(s)


(n, m) = [int(i) for i in input().split()]
s = ''
each = m // n
if n == 1 and each <= 4:
	s += '0'
	temp = min(2, each)
	t1 = '1' * temp
	s += t1
	r = each - temp
	t1 = '1' * r
	s = t1 + s
	print(s)
elif each == 0 or each >= 3:
	rem = m % n
	if each == 0 and rem == n - 1:
		s += '01'
		s *= n - 1
		s += '0'
		print(s)
	elif each >= 3 and rem == 0:
		if (m - 2) // n < 3:
			s += '011'
			s *= n
			s = '11' + s
			print(s)
		else:
			print(-1)
	else:
		print(-1)
else:
	rem = m % n
	if each == 2 and rem > 2:
		print(-1)
	elif each == 2 and rem <= 2:
		s += '011'
		s *= n
		temp = '1' * rem
		s = temp + s
		print(s)
	elif rem > 0:
		s += '011'
		s *= rem
		avail = n - rem
		temp = '01'
		temp *= avail
		s = s + temp
		print(s)
	else:
		s += '01'
		s *= n
		print(s)


import sys, os
import math
from fractions import Fraction
from collections import defaultdict
from random import randint
from itertools import combinations, permutations

def linput():
	return list(minput())

def minput():
	return map(int, sys.stdin.readline().strip().split())
(n, m) = minput()
mn = n + 1
mx = 2 * (n + 1)
if n == m:
	print('10' * m)
elif m + 1 == n:
	print('0', end='')
	print('10' * m)
elif m < mn or m > mx:
	print('-1')
else:
	ans = []
	extra = m - (n + 1)
	t = 1
	i = 0
	while i != n + m:
		if t == 1:
			ans.append('1')
			i += 1
			if extra != 0:
				extra -= 1
				ans.append('1')
				i += 1
		else:
			ans.append('0')
			i += 1
		t *= -1
	print(''.join(ans))


(n, m) = map(int, input().split())
if n == m:
	print('10' * n)
elif n > m:
	if n > m + 1:
		print('-1')
	else:
		ans = '0' + '10' * m
		print(ans)
elif m > (n + 1) * 2:
	print('-1')
elif m == (n + 1) * 2:
	ans = '11' + '011' * n
	print(ans)
elif m == 2 * n + 1:
	ans = '1' + '011' * n
	print(ans)
elif m == 2 * n:
	print('011' * n)
else:
	ans = ''
	while m > n and n > 0 and (m > 0):
		n -= 1
		m -= 2
		ans += '011'
	if n == m and m >= 0:
		ans += '01' * m
	if n == m + 1 and m >= 0:
		ans += '0' + '10' * m
	print(ans)


(n, m) = [int(i) for i in input().split()]
if m == n:
	s = ''
	for i in range(m):
		s += '10'
	print(s)
elif m > n:
	if m > 2 * (n + 1):
		print(-1)
	else:
		s = ''
		for i in range(m - n - 1):
			s += '110'
		for j in range(2 * (n + 1) - m):
			s += '10'
		print(s[:m + n])
elif n > m + 1:
	print(-1)
else:
	s = ''
	for j in range(m):
		s += '01'
	s += '0'
	print(s)


def f(n, m):
	if m > n + 1 or n > 2 * (m + 1):
		return -1
	elif m == n + 1:
		return '01' * n + str(0)
	elif n == 2 * m + 2:
		return '110' * m + str(11)
	elif n == 2 * m + 1:
		return '110' * m + str(1)
	else:
		d1 = n - m
		d2 = 2 * m - n
		return '110' * d1 + '10' * d2
nm = list(map(int, input().rstrip().split()))
n = nm[1]
m = nm[0]
print(f(n, m))


I = lambda : list(map(int, input().split()))
f = lambda x: ['', '1', '11'][x]
(n, m) = I()
if n > m + 1 or m - 2 > n * 2:
	print(-1)
else:
	g0 = m < n
	g110 = min(max(m - n, 0), n)
	g10 = n - g110 - g0
	g1 = max(m - n * 2, 0)
	print('0' * g0 + '110' * g110 + '10' * g10 + '1' * g1)


from sys import stdin, stdout
(n, m) = map(int, stdin.readline().split())
if n - 1 <= m <= 2 * (n + 1):
	m -= n - 1
	if m == 0:
		string = '0' + '10' * (n - 1)
	elif m - 1 <= n:
		string = '110' * (m - 1) + '10' * (n - m + 1)
	else:
		string = '110' * n + '1' * (m - 1 - n)
	stdout.write(string + '\n')
else:
	stdout.write(str(-1) + '\n')


(m, n) = map(int, input().split())
if m > n + 1:
	print('-1')
elif n > m + m + 2:
	print('-1')
elif m >= n:
	if m == n + 1:
		print('01' * n + '0')
	else:
		print('01' * n)
elif n >= m + m:
	if n == m + m + 2:
		print('11' + '011' * m)
	elif n == m + m + 1:
		print('1' + '011' * m)
	else:
		print('011' * m)
else:
	print('011' * (n - m), end='')
	print('01' * (m - (n - m)))


import sys
(n, m) = [int(x) for x in input().split()]
if n * 2 + 2 < m or n > m + 1:
	print(-1)
	exit()
k = min(min(max(0, n * 2 - m), m), n)
s = '10' * k
n -= k
m -= k
k = min(n, m // 2)
s += '110' * k
n -= k
m -= k * 2
print(n * '0' + s + m * '1')


def pro():
	(a, b) = [int(i) for i in input().split()]
	if a > b:
		if a - 1 == b:
			return '01' * b + '0'
		else:
			return '-1'
	res = ''
	while b - 1 > a and a > 0:
		res += '110'
		a -= 1
		b -= 2
		if a == 0 and b >= 3:
			return '-1'
	while a > 0 or b > 0:
		if b > 0:
			res += '1'
			b -= 1
		if a > 0:
			res += '0'
			a -= 1
	return res
print(pro())


(n, m) = map(int, input().split())
if n - 1 <= m <= 2 * n + 2:
	ans = ['0'] * (n + m)
	z = m - (n + 1)
	count = 0
	if z > 0:
		for i in range(n + m):
			if (i + 1) % 3 == 0 and count < z:
				count += 1
				if count == z:
					break
				continue
			else:
				ans[i] = '1'
	else:
		i = -1
	if m != n - 1:
		for j in range(i + 1, n + m, 2):
			ans[j] = '1'
	else:
		for j in range(1, n + m, 2):
			ans[j] = '1'
	print(''.join(ans))
else:
	print(-1)


from itertools import accumulate
import sys
input = sys.stdin.readline
(n0, n1) = map(int, input().split())
ans = -1
if n0 - 1 <= n1 <= 2 * n0 + 2:
	if n1 == n0 - 1:
		ans = '0' + '10' * n1
	elif n1 == 2 * n0 + 1:
		ans = '110' * n0 + '1'
	elif n1 == 2 * n0 + 2:
		ans = '110' * n0 + '11'
	else:
		ans = '110' * (n1 - n0) + '10' * (n0 - (n1 - n0))
print(ans)


(n, m) = [int(s) for s in input().split(' ')]
if n - m > 1 or m > 2 * (n + 1):
	print(-1)
elif n == m + 1:
	print('1'.join(['0' for _ in range(n)]))
else:
	carry = m - n
	count = 0
	res = []
	for _ in range(n):
		res.append('1')
		if carry > 0:
			res.append('1')
			carry -= 1
		res.append('0')
	if carry > 0:
		res.append('1' * carry)
	print(''.join(res))


(n, m) = list(map(int, input().split(' ')))
answer = '-1'
if m > n:
	for k in range(1, n + 1):
		if n - k in [m - 2 * k, m - 2 * k - 1, m - 2 * k - 2]:
			answer = '110' * k + '10' * (n - k) + '1' * (m - k - n)
elif m == n:
	answer = '10' * n
elif m == n - 1:
	answer = '01' * (n - 1) + '0'
print(answer)


(n, m) = [int(a) for a in input().split()]
if 2 * n + 2 < m or m + 1 < n:
	print(-1)
else:
	output = ''
	if m < n:
		n -= 1
		output += '0'
	while m > 1 and n > 0:
		if m == n:
			output += '10' * m
			m = 0
			n = 0
		else:
			output += '110'
			m -= 2
			n -= 1
	output += '1' * m
	output += '0' * n
	print(output)


(n, m) = [int(d) for d in input().split()]
if n > m + 1 or (n + 1) * 2 < m:
	print(-1)
elif n > m:
	print('01' * m + '0')
elif m > n * 2:
	print('110' * n + '1' * (m - n * 2))
else:
	print('110' * (m - n) + '10' * (n * 2 - m))


inp = list(map(int, input('').split(' ')))
(n, m) = (inp[0], inp[1])
if n > m + 1:
	print(-1)
elif m > n * 2 + 2:
	print(-1)
elif n > m:
	print('01' * m + '0')
elif m > n * 2:
	print('110' * n + '1' * (m - n * 2))
else:
	print('110' * (m - n) + '10' * (n * 2 - m))


(z, o) = map(int, input().split())
ans = 0
if z > o + 1 or o > 2 * (z + 1):
	print('-1')
	ans = 1
if ans == 0:
	if z >= o:
		for i in range((o + z) // 2):
			print('01', end='')
		if (o + z) % 2 == 1:
			print('0', end='')
	else:
		oo = o - z
		if o >= 2 * z:
			for i in range(z):
				print('110', end='')
			for i in range(o - 2 * z):
				print('1', end='')
		else:
			j = 0
			for i in range(z):
				if j < o - z:
					print('1', end='')
					j += 1
				print('10', end='')


(z, o) = map(int, input().split())
t = []
if z - o > 1:
	print(-1)
elif z - o == 0 or z - o == 1:
	for i in range(o):
		t.append('01')
	if z > o:
		t.append('0')
elif o - z == 1:
	for i in range(z):
		t.append('01')
	t.append('1')
elif z - o > 1:
	print(-1)
else:
	temp = []
	while o - z > 1:
		z -= 1
		o -= 2
		temp.append('110')
		if z == 0:
			break
	if z == 0 and abs(o - z) > 2:
		print(-1)
	else:
		t = temp[:]
		for i in range(z):
			t.append('10')
		dif = o - z
		for j in range(dif):
			t.append('1')
text = ''.join(t)
print(text)


def main(n, m):
	if m == n - 1:
		print('0' + '10' * m)
	elif m == n:
		print('10' * m)
	elif m > n and m <= 2 * (n + 1):
		if m > 2 * (m - n - 1) and n > m - n - 1:
			print('110' * (m - n - 1), end='')
			new_m = m - 2 * (m - n - 1)
			new_n = n - (m - n - 1)
			n = new_n
			m = new_m
		ret = '10' * n + '1'
		m2 = m - n - 1
		for e in ret:
			if int(e):
				print('1', end='')
				if m2:
					print('1', end='')
					m2 -= 1
			else:
				print('0', end='')
	else:
		print('-1')
(n, m) = map(int, input().split())
main(n, m)


(z, o) = list(map(int, input().split()))
a = 0
b = 0
c = 0
yy = 0
if o > z:
	for i in range(z, 0, -1):
		if i * 2 <= o and o - i * 2 >= z - i:
			a = int(i)
			break
aa = 0
a = int(a)
aa = yy
z = z - a
o = o - 2 * a
b = z
aaa = 0
if z:
	mi = min(z, o)
	b = mi
	z -= b
	o -= b
xx = ''
x = ''
if z:
	if z == 1:
		xx = '0'
	else:
		x = '-1'
elif o >= 3:
	x = '-1'
elif o > 0:
	x = '1' * int(o)
if x == '-1':
	print(x)
else:
	print(xx + '110' * int(a) + '10' * int(b) + x)


(n, m) = map(int, input().split())
if not (m <= 2 * n + 2 and m >= n - 1):
	print(-1)
elif m == n - 1:
	print('0' + '10' * m)
elif m <= 2 * n:
	print((m - n) * '110' + (2 * n - m) * '10')
elif m == 2 * n + 1:
	print('110' * n + '1')
else:
	print('11' + '011' * n)


(n, m) = map(int, input().split())
if m >= n - 1 and m <= 2 * (n + 1):
	ans = []
	for i in range(n - 1):
		ans.append('01')
	m -= n - 1
	ans.append('0')
	if m <= 2:
		ans.insert(0, '1' * m)
		print(''.join(ans))
	else:
		print('11', end='')
		m -= 2
		for x in ans:
			print(x, end='')
			if m > 0:
				print('1', end='')
				m -= 1
		if m > 0:
			print('1', end='')
else:
	print('-1')


from math import inf as inf
from math import *
from collections import *
import sys
input = sys.stdin.readline
t = 1
while t:
	t -= 1
	(n, m) = map(int, input().split())
	x = min(n, m)
	(n, m) = (n - x, m - x)
	if n >= m:
		flag = 0
	else:
		flag = 1
	if flag == 0:
		if n > 1:
			print(-1)
			exit(0)
		else:
			print('01' * x + '0' * n)
	else:
		s = ''
		for i in range(x):
			if m:
				s += '110'
				m -= 1
			else:
				s += '10'
		if m <= 2:
			s += '1' * max(0, m)
			print(s)
		else:
			print(-1)


(n, m) = [int(x) for x in input().split(' ')]
if m < n - 1:
	print('-1')
	exit(0)
if m > 2 * (n - 1) + 4:
	print('-1')
	exit(0)
zero = n
one = m
one -= zero - 1
ans = ''
for i in range(2):
	if one > 0:
		ans += '1'
		one -= 1
ans += '0'
for i in range(zero - 1):
	ans += '1'
	if one > 0:
		ans += '1'
		one -= 1
	ans += '0'
for i in range(one):
	ans += '1'
print(ans)


(n, m) = (int(i) for i in input().split())
if n == 1 and m == 1:
	print('10')
elif n >= m:
	s = '01'
	ans = s * m
	if n >= m + 2:
		print(-1)
	elif n == m + 1:
		ans += '0'
		print(ans)
	else:
		print(ans)
else:
	s = '10'
	c = m - n
	s1 = '110'
	if c > n + 2:
		print(-1)
	elif c > n:
		print(s1 * n + '1' * (c - n))
	else:
		print(s1 * c + s * (n - c))


import sys, os.path
from collections import *
from copy import *
import math
mod = 10 ** 9 + 7
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(n, m) = map(int, input().split())
if n > m + 1 or 2 * n + 2 < m:
	print(-1)
elif n >= m:
	if n > m:
		s = '01' * m + '0'
	else:
		s = '01' * n
	print(s)
else:
	s = '10' * n + '1'
	s = s.replace('1', '11', m - n - 1)
	print(s)


R = lambda : map(int, input().split())
(n, m) = R()
if n > m + 1 or n < (m - 3) // 2 + 1:
	print(-1)
elif n == m + 1:
	print('01' * m + '0')
elif n == m:
	print('01' * m)
elif m >= 2 * n:
	print('110' * n + '1' * (m - 2 * n))
else:
	m -= n + 1
	s = '110' * m + '1' + '01' * (n - m)
	print(s)


(n_, m_) = map(int, input().split())
for (d_n, d_m) in [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)]:
	n = n_ - d_n
	m = m_ - d_m
	k1 = m - n
	k2 = 2 * n - m
	if k1 < 0 or k2 < 0:
		continue
	p1 = '0' if d_n else ''
	p2 = ''.join(['110'] * k1)
	p3 = ''.join(['10'] * k2)
	p4 = '' if d_m == 0 else '1' if d_m == 1 else '11'
	print(''.join([p1, p2, p3, p4]))
	exit(0)
print(-1)


from sys import stdin
(n, k) = map(int, stdin.readline().rstrip().split(' '))
if k - 2 > 2 * n or n - 1 > k:
	print(-1)
elif k == n:
	print('01' * k)
elif n - k == 1:
	print('01' * k + '0')
else:
	extra = k - n
	for i in range(n):
		if extra:
			print('110', end='')
			extra -= 1
		else:
			print('10', end='')
	print('1' * extra)


def main():
	(n, m) = map(int, input().split())
	c = [0] * (n + 1)
	for i in range(1, m + 1):
		c[i % (n + 1)] += 1
	if len(c) > 2 and min(c[1:-1]) == 0 or max(c) > 2:
		print(-1)
	else:
		print('0'.join(('1' * x for x in c)))
main()


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return map(int, input().split())

def array():
	return [int(i) for i in input().split()]
(n, m) = value()
if m < n - 1 or m > 2 * (n + 1):
	print(-1)
	exit()
if m < n:
	n -= 1
	print(0, end='')
m -= n
ans = [1, 0] * n
t = m
for i in range(n):
	if m != 0:
		m -= 1
		print('1', end='')
	print('10', end='')
if m != 0:
	print('1' * m)


def main():
	(n, m) = map(int, input().split())
	if n - 2 < m < n * 2 + 3:
		res = []
		while 0 < n < m:
			res.append('110')
			m -= 2
			n -= 1
		while n and m:
			res.append('10')
			m -= 1
			n -= 1
		if m:
			res.append('1' * m)
		elif n:
			res[0] = '0' + res[0]
		print(''.join(res))
	else:
		print(-1)
main()


def main():
	(n, m) = map(int, input().split())
	s = ''
	if 2 * n + 2 < m:
		print(-1)
		return
	if n > m:
		if n - 1 > m:
			print(-1)
			return
		else:
			s = '0'
	while m > n + 1 and n > 0:
		s += '110'
		n -= 1
		m -= 2
	while m > 0 and n > 0:
		s += '10'
		n -= 1
		m -= 1
	s += '1' * m
	print(s)
main()


(n, m) = list(map(int, input().split()))
if m < n - 1 or n * 2 + 2 < m:
	print(-1)
else:
	res = ''
	if m > n:
		d = min(m - n, n)
		res += '110' * d
		n -= d
		m -= 2 * d
	t = min(m, n)
	res += '10' * t
	m -= t
	n -= t
	if m > 0:
		res += '1' * m
	if n > 0:
		res = '0' + res
	print(res)


(n, m) = map(int, input().split())
s = ''
if m + 1 < n or m > 2 * (n + 1):
	print(-1)
elif n == m:
	s = '01' * n
	n = 0
	m = 0
	print(s)
elif n == m - 1:
	s = '101' + '01' * (n - 1)
	n = 0
	m = 0
	print(s)
elif n - 1 == m:
	s = '010' + '10' * (m - 1)
	n = 0
	m = 0
	print(s)
else:
	k = n + m
	i = 0
	s = '1' + '01' * n
	m = m - n - 1
	x = len(s)
	s = list(s)
	for i in range(0, x):
		if s[i] == '1' and m > 0:
			s[i] = '11'
			m -= 1
	if m == 0:
		print(''.join(s))
	elif m <= 2:
		v = '1' * m
		s.append(v)
		print(''.join(s))


(n, m) = list(map(int, input().split()))
if m <= 2 * n + 2 and n <= m + 1:
	ans = ''
	if m // n == 1:
		r = m % n
		ans = r * '110' + (n - r) * '10'
	elif m // n == 2:
		r = m % n
		ans = n * '110' + r * '1'
	elif m // n == 0:
		ans = '0' + m * '10'
	elif m // n == 3 or m // n == 4:
		ans = n * '110' + (m - 2 * n) * '1'
	print(ans)
else:
	print(-1)


(n, m) = map(int, input().split())
if n == m or n == m - 1:
	s = ''
	s2 = '10'
	while len(s) < m + n:
		s = s + s2
	s = s[:m + n]
	print(s)
elif n == m + 1:
	s = ''
	s2 = '01'
	while len(s) < m + n:
		s = s + s2
	s = s[:m + n]
	print(s)
elif m > n and m <= 2 * (n + 1):
	s = '110'
	c1 = n
	c2 = m
	s1 = ''
	while c1 != c2 and (c1 > 0 or c2 > 0):
		s1 = s1 + s
		c1 -= 1
		c2 -= 2
	if c1 == c2:
		s2 = '10'
		s1 = s1 + c2 * s2
	s1 = s1[:m + n]
	print(s1)
else:
	print(-1)


import math as ma
(n, m) = map(int, input().split())
if n < ma.ceil(m / 2) - 1 or n > m + 1:
	print(-1)
else:
	ans = ''
	while m != n and n != m + 1 and (n > 0) and (m > 0):
		ans = ans + '110'
		m -= 2
		n -= 1
	while m > 0 and n > 0:
		ans = ans + '10'
		m -= 1
		n -= 1
	if m > 0:
		for i in range(m):
			ans = ans + '1'
	if n > 0:
		ans = '0' + ans
	print(ans)


from __future__ import division, print_function
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)
	print(l)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans
(n, m) = mi()
if n > m + 1 or 2 * n + 2 < m:
	print(-1)
elif n == m + 1:
	print('01' * m + '0')
elif n == m:
	print('01' * n)
elif 2 * n + 2 == m:
	print('110' * n + '11')
else:
	t = m - n - 1
	print('110' * t + '10' * (n - t) + '1')


def team(n, m):
	if m < n - 1 or m > 2 * (n - 1) + 4:
		return -1
	else:
		ans = ''
		o = m
		z = n
		if z > o:
			start = 'zero'
		else:
			start = 'one'
		while o > 0 or z > 0:
			if start == 'zero':
				ans += '0'
				z -= 1
				start = 'one'
			elif o > 2 * z + 1:
				ans += '11'
				o -= 2
				start = 'zero'
			else:
				ans += '1'
				o -= 1
				start = 'zero'
		return ans
(n, m) = list(map(int, input().split()))
print(team(n, m))


(n, m) = input().split()
(n, m) = (int(n), int(m))
if n >= m:
	if n - m > 1:
		f = '-1'
	else:
		f = ''
		for i in range(n + m):
			if i % 2 == 0:
				f += '0'
			else:
				f += '1'
	print(f)
else:
	f = ''
	if m / 2 - n >= 0:
		if m / 2 - n <= 1:
			for i in range(n + int(m / 2)):
				if i % 2 == 0:
					f += '11'
				else:
					f += '0'
			y = m / 2 - n
			if m / 2 - n < 1:
				for i in range(int(2 * y)):
					f += '1'
		else:
			f = '-1'
		print(f)
	else:
		x = m - n
		for j in range(x):
			f += '110'
		for i in range(n - x):
			f += '10'
		print(f)


from sys import stdout

def main():
	(zeros, ones) = (int(x) for x in input().split())
	ans = ''
	if zeros == ones:
		for i in range(zeros):
			ans += '01'
	elif zeros > ones + 1:
		ans += '-1'
	elif zeros == ones + 1:
		for i in range(zeros - 1):
			ans += '01'
		ans += '0'
	elif ones > 2 * zeros + 2:
		ans += '-1'
	else:
		while ones != zeros and zeros != 0:
			ans += '110'
			ones = ones - 2
			zeros = zeros - 1
		if ones == zeros:
			while ones:
				ans += '10'
				ones = ones - 1
				zeros = zeros - 1
		if ones != 0:
			while ones != 0:
				ans += '1'
				ones = ones - 1
	stdout.write(ans)
main()


a = list(map(int, input().split(' ')))
zeros = a[0]
ones = a[1]
result = ''
if ones > zeros * 2 + 2 or ones < zeros - 1:
	print(-1)
elif ones == zeros - 1:
	result += '0'
	for i in range(0, ones):
		result += '10'
elif ones <= zeros * 2:
	dif = ones - zeros
	for i in range(0, dif):
		result += '110'
	for i in range(0, zeros - dif):
		result += '10'
else:
	dif = ones - zeros * 2
	for i in range(0, zeros):
		result += '110'
	for i in range(0, dif):
		result += '1'
print(result)


(n, m) = map(int, input().split())
if n - 1 > m or m / 2 > n + 1:
	print(-1)
else:
	s = ''
	if n - 1 == m:
		s += '0'
		for i in range(0, m):
			s += '10'
	elif n * 2 <= m:
		for i in range(0, n):
			s += '110'
		a = m - n * 2
		for i in range(0, a):
			s += '1'
	else:
		a = m - n
		for i in range(0, a):
			s += '110'
		b = n - a
		for i in range(0, b):
			s += '10'
	print(s)


def find_sequence(zeros, ones):
	sequence = ''
	if zeros <= ones:
		if zeros < 0:
			return -1
		double_one_sequence = ones - zeros
		single_one_sequence = zeros - double_one_sequence
		if double_one_sequence <= zeros:
			sequence = '011' * double_one_sequence
		elif double_one_sequence <= zeros + 2:
			sequence = '110' * zeros
		elif double_one_sequence > zeros:
			return -1
		else:
			pass
		if single_one_sequence >= 0:
			sequence = sequence + '01' * single_one_sequence
		else:
			sequence = sequence + '1' * abs(single_one_sequence)
	else:
		if zeros - ones == 0:
			sequence = ''
			remaining_zeros = zeros
		elif zeros - ones == 1:
			sequence = '0'
			remaining_zeros = zeros - 1
		else:
			return -1
		if remaining_zeros != ones:
			return -1
		for i in range(ones):
			sequence = sequence + '10'
	return sequence
inp = input()
ss = inp.split(' ')
zeros = int(ss[0])
ones = int(ss[1])
se = find_sequence(zeros, ones)
print(se)


import time, math, bisect, sys
from sys import stdin, stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi = 3.141592653589793

def II():
	return int(stdin.readline())

def IO():
	return stdin.readline()

def IP():
	return map(int, stdin.readline().split())

def L():
	return list(map(int, stdin.readline().split()))

def P(x):
	return stdout.write(str(x))

def PI(x, y):
	return stdout.write(str(x) + ' ' + str(y) + '\n')

def lcm(a, b):
	return a * b // gcd(a, b)

def gcd(a, b):
	if a == 0:
		return b
	elif b == 0:
		return a
	if a > b:
		return gcd(a % b, b)
	else:
		return gcd(a, b % a)

def readTree():
	v = int(input())
	adj = [set() for i in range(v + 1)]
	for i in range(v - 1):
		(u1, u2) = In()
		adj[u1].add(u2)
		adj[u2].add(u1)
	return (adj, v)

def bfs(adj, v):
	visited = [False] * (v + 1)
	q = deque()
	while q:
		pass

def sieve():
	li = [True] * 1000001
	(li[0], li[1]) = (False, False)
	for i in range(2, len(li), 1):
		if li[i] == True:
			for j in range(i * i, len(li), i):
				li[j] = False
	prime = []
	for i in range(1000001):
		if li[i] == True:
			prime.append(i)
	return prime

def setBit(n):
	count = 0
	while n != 0:
		n = n & n - 1
		count += 1
	return count

def solve():
	(n, m) = IP()
	if m > 2 * n + 2:
		print(-1)
	elif m < n - 1:
		print(-1)
	elif m == n - 1:
		s = '01' * (n - 1) + '0'
		print(s)
	elif m == n:
		s = '10' * n
		print(s)
	else:
		x = n + 1
		y = m - x
		s = '110' * y
		if y == n + 1:
			print('110' * n + '11')
		elif y == n:
			print('110' * n + '1')
		else:
			print(s + '10' * (n - y) + '1')
solve()


from sys import stdin, stdout
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, input().split()))
for _ in range(1):
	(z, o) = lst()
	(z1, o1) = (z, o)
	if o < z - 1 or o > 2 * (z - 1) + 4:
		print(-1)
	else:
		ln = 2 * (z - 1) + 4 + z
		ans = [-1] * ln
		p = 2
		while p < ln and z1:
			ans[p] = 0
			p += 3
			z1 -= 1
		p = 3
		ones = z - 1
		while p < ln and ones:
			ans[p] = 1
			p += 3
			ones -= 1
		o1 -= z - 1
		if o1:
			ans[0] = 1
			o1 -= 1
		if o1:
			ans[1] = 1
			o1 -= 1
		if o1:
			ans[-1] = 1
			o1 -= 1
		if o1:
			ans[-2] = 1
			o1 -= 1
		p = 4
		while p < ln and o1:
			ans[p] = 1
			p += 3
			o1 -= 1
		for v in ans:
			if v != -1:
				stdout.write(str(v))


(zeroes, ones) = map(int, input().split())
if zeroes > 1 + ones or ones > (zeroes + 1) * 2:
	print(-1)
elif zeroes == 1 + ones:
	print('0' + '10' * ones)
else:
	ans = '1x0' * zeroes + 'xx'
	ans = ans.replace('x', '1', ones - zeroes)
	ans = ans.replace('x', '')
	print(ans)


(n, m) = map(int, input().split())
if n - m > 1 or m > 2 * (n + 1):
	print(-1)
	exit()
(res, x) = ('', 0)
while n >= 1 and m >= 1:
	res += '10'
	n -= 1
	m -= 1
	x += 1
res = '0' * n + res.replace('1', '11', m) + '1' * max(0, m - x)
print(res)


(z, u) = map(int, input().split())
ans = ''
ex = 0
if u > z:
	ex = u - (z + 1)
	u -= ex
	ans += '1'
	u -= 1
	if ex > 0:
		ans += '1'
		ex -= 1
if u < ex or z > u + 1:
	print(-1)
else:
	while True:
		if z == 0:
			break
		else:
			ans += '0'
			z -= 1
		if u == 0:
			break
		else:
			ans += '1'
			u -= 1
			if ex > 0:
				ans += '1'
				ex -= 1
	print(ans)


(n, m) = map(int, input().split())
if m > 2 * n + 2 or m < n - 1:
	print('-1')
else:
	s = ['' for i in range(3 * n - 2)]
	for i in range(3 * n - 2):
		if i % 3 == 1:
			s[i] = '1'
		elif i % 3 == 0:
			s[i] = '0'
	m -= n - 1
	for i in range(min(m, n - 1)):
		s[3 * i + 2] = '1'
	m -= min(m, n - 1)
	if m <= 2:
		ans = '1' * m + ''.join(s)
	else:
		ans = '1' * 2 + ''.join(s) + '1' * (m - 2)
	print(ans)


(x, y) = map(int, input().split())
if x == 1 and y > 4 or x - y >= 2 or y - 2 * x > 2:
	print('-1')
	exit()
elif x - y == 1:
	print('0' + '10' * y)
elif (x == y or y - x == 1 or y - x == 2) and y >= x:
	print('10' * min(x, y) + '1' * (y - x))
else:
	p = y - x
	if p > x:
		print('110' * x + '1' * (y - 2 * x))
	else:
		print('110' * p + '10' * (x - p))


(n, m) = map(int, input().split())
s = ''
if m <= 2 * n + 2 and m >= n - 1:
	if m == n - 1:
		while m > 0 and n > 0:
			s += '01'
			n -= 1
			m -= 1
		if n == 1:
			s += '0'
	else:
		while m > 0 and n > 0 and (m != n) and (m >= n + 1):
			s += '110'
			m -= 2
			n -= 1
		while m > 0 and n > 0 and (m != 0) and (n != 0):
			s += '10'
			n -= 1
			m -= 1
		if m == 1:
			s += '1'
		if m == 2:
			s += '11'
	print(s)
else:
	print(-1)


from math import ceil
(zeros, ones) = map(int, input().strip().split())
if zeros > ones + 1 or ones > 2 * zeros + 2:
	print(-1)
elif ones == zeros - 1:
	ans = '0' + '10' * ones
	print(ans)
elif ones <= 2 * zeros:
	diff = ones - zeros
	ans = '110' * diff + '10' * (zeros - diff)
	print(ans)
else:
	diff = ones - 2 * zeros
	ans = '110' * zeros + '1' * diff
	print(ans)


m = list(map(int, input().split()))
n = m[0]
m = m[1]
ans = ''
if m + 1 >= n and m <= (n + 1) * 2:
	if m == n:
		for i in range(m):
			ans = ans + '10'
	elif m == n - 1:
		ans = '0'
		for i in range(m):
			ans = ans + '10'
	elif m == (n + 1) * 2:
		for i in range(n):
			ans = ans + '110'
		ans = ans + '11'
	else:
		pairs = m - n - 1
		singles = n - pairs
		for i in range(pairs):
			ans = ans + '110'
		for j in range(singles):
			ans = ans + '10'
		ans = ans + '1'
else:
	ans = '-1'
print(ans)


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, m) = map(int, input().split())
if n > m + 1 or m > 2 * n + 2:
	print(-1)
elif n >= m:
	print('01' * m + '0' * (n > m))
else:
	print(('10' * n + '1').replace('1', '11', m - n - 1))


import sys
(n, m) = map(int, input().split())
if n - 1 > m or m > 2 * (n + 1):
	print(-1)
	sys.exit()
s = ''
if m == n - 1:
	for i in range(m + n):
		if i % 2 == 0:
			s = s + '0'
		else:
			s = s + '1'
	print(s)
	sys.exit()
if m == n or m == n + 1:
	for i in range(n + m):
		if i % 2 == 0:
			s = s + '1'
		else:
			s = s + '0'
	print(s)
	sys.exit()
x = 3 * m - 3 * n - 4
if m > n + 1 and m <= 2 * (n + 1):
	for i in range(1, m + n + 1):
		if i <= x:
			if i % 3 == 0:
				s = s + '0'
			else:
				s = s + '1'
		elif x % 2 == 0:
			if i % 2 != 0:
				s = s + '0'
			else:
				s = s + '1'
		elif i % 2 != 0:
			s = s + '1'
		else:
			s = s + '0'
	print(s)
	sys.exit()


(n, m) = list(map(int, input().split()))
if 1 == 1:
	if m + 1 < n or m > 2 * n + 2:
		print(-1)
		exit()
	while m > 0 and n > 0:
		if m == n:
			print('10', end='')
			m -= 1
			n -= 1
		elif m > n:
			print('110', end='')
			m -= 2
			n -= 1
		elif m < n:
			print('01', end='')
			m -= 1
			n -= 1
	for i in range(n):
		print('0', end='')
	for j in range(m):
		print('1', end='')
	print('\n')


(zero, one) = map(int, input().split())
sz = zero + one
n = zero
m = one
s = ''
f = 1
i = 0
if m == n - 1:
	print('01' * m + '0')
	exit()
if m == n:
	print('01' * n)
	exit()
if m > 2 * (n + 1):
	print(-1)
	exit()
if not n - 1 <= m:
	print(-1)
	exit()
turn = 1
s = ''
while m != n and m != n - 1 and (m > 0) and (n > 0):
	if m == 1:
		s += '1'
		m = 0
		break
	s += '11'
	m -= 2
	if not n:
		break
	s += '0'
	n -= 1
if zero * 2 + 1 == m:
	s = '0' + s
	n -= 1
if m == n:
	print(s + '10' * n)
elif m == n - 1:
	s = '0' + s
	m -= 1
	print(s + '10' * m)
else:
	print(s + '0' * n + '1' * m)
exit()


(n_zeroes, n_ones) = map(int, input().split())
out = ''
if n_zeroes < n_ones / 2 - 1 or n_ones < n_zeroes - 1:
	print(-1)
else:
	if n_zeroes < n_ones:
		diff = min(n_ones - n_zeroes, n_zeroes)
		out += '110' * diff
		n_ones -= 2 * diff
		n_zeroes -= diff
		if n_zeroes > 0:
			out += '10' * n_zeroes
			n_zeroes = 0
			n_ones = 0
		if n_ones > 0:
			out += '1' * n_ones
	elif n_ones < n_zeroes:
		out += '01' * n_ones
		out += '0'
	else:
		out = '10' * n_ones
	print(out)


from math import ceil
(n, m) = list(map(int, input().split()))
s1 = ''
s2 = ''
if not (n - 1 <= m and m <= 2 * (n + 1)):
	print(-1)
elif m == n - 1:
	print('01' * m + '0')
elif m == n:
	print('10' * m)
else:
	s1 = '10' * n + '1'
	for i in s1:
		s2 += i
		if i == '1' and m - n - 1:
			s2 += '1'
			m -= 1
	print(s2)


(a, b) = [int(i) for i in input().split()]
if a > b:
	if a - 1 == b:
		print('01' * b + '0')
	else:
		print(-1)
	exit()
res = ''
while b - 1 > a and a > 0:
	res += '110'
	a -= 1
	b -= 2
	if a == 0 and b >= 3:
		print(-1)
		exit()
while a > 0 or b > 0:
	if b > 0:
		res += '1'
		b -= 1
	if a > 0:
		res += '0'
		a -= 1
print(res)


(n, m) = map(int, input().strip().split())
if m > 2 * (n + 1):
	print('-1')
elif n > m + 1:
	print('-1')
else:
	r = m % (n + 1)
	d1 = m // (n + 1)
	c1 = 0
	c2 = 0
	d2 = -1
	if d1 == 1:
		c1 = n + 1 - r
		c2 = r
		d2 = d1 + 1
	if n > m:
		print('01' * m + '0')
	elif n == m:
		print('10' * n)
	elif n + 1 == m:
		print('10' * n + '1')
	elif r != 0:
		s = '110' * c2 + '10' * (c1 - 1) + '1'
		print(s)
	else:
		s = '110' * n + '11'
		print(s)


import sys
(zero, ones) = map(int, input().split())
ans = ''
if zero - ones > 1:
	print(-1)
	sys.exit(0)
elif zero - ones == 1:
	for i in range(ones + zero):
		if i % 2 == 0:
			ans += '0'
		else:
			ans += '1'
	print(ans)
	sys.exit(0)
elif ones == zero:
	res = ''
	for i in range(ones):
		res += '10'
	print(res)
elif ones > zero:
	per = 0
	if ones % 2 == 0:
		per = ones // 2 - 1
	else:
		per = ones // 2
	if per > zero:
		print(-1)
		sys.exit(0)
	else:
		res = ''
		c = 0
		for i in range(ones - zero - 1):
			c += 2
			res += '110'
		for i in range(zero - (ones - zero - 1)):
			c += 1
			res += '10'
		for i in range(ones - c):
			res += '1'
		if ones - zero - 1 == ones / 2:
			print(res[0:len(res) - 1])
		else:
			print(res)


n = input().split(' ')
zeros = int(n[0])
ones = int(n[1])
res = ''
if zeros > ones + 1:
	print(-1, end='')
elif ones > zeros * 2 + 2:
	print(-1, end='')
else:
	if zeros == ones + 1:
		res = '0'
		zeros -= 1
	while ones > zeros and ones > 0:
		if ones > 1:
			res += '11'
			ones -= 2
		elif ones > 0:
			res += '1'
			ones -= 1
		if zeros > 0:
			res += '0'
			zeros -= 1
	while zeros >= ones and zeros > 0:
		if ones > 0:
			res += '1'
			ones -= 1
		if zeros > 0:
			res += '0'
			zeros -= 1
print(res)


import bisect
import decimal
from decimal import Decimal
import os
from collections import Counter
import bisect
from collections import defaultdict
import math
import random
import heapq
from math import sqrt
import sys
from functools import reduce, cmp_to_key
from collections import deque
import threading
from itertools import combinations
from io import BytesIO, IOBase
from itertools import accumulate
decimal.getcontext().prec = 46

def primeFactors(n):
	prime = set()
	while n % 2 == 0:
		prime.add(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			prime.add(i)
			n = n // i
	if n > 2:
		prime.add(n)
	return list(prime)

def getFactors(n):
	factors = []
	i = 1
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				factors.append(i)
			else:
				factors.append(i)
				factors.append(n // i)
		i = i + 1
	return factors

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	num = []
	for p in range(2, n + 1):
		if prime[p]:
			num.append(p)
	return num

def lcm(a, b):
	return a * b // math.gcd(a, b)

def sort_dict(key_value):
	return sorted(key_value.items(), key=lambda kv: (kv[1], kv[0]))

def list_input():
	return list(map(int, input().split()))

def num_input():
	return map(int, input().split())

def string_list():
	return list(input())

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def binaryToDecimal(n):
	return int(n, 2)

def DFS(n, s, adj):
	visited = [False for i in range(n + 1)]
	stack = []
	stack.append(s)
	while len(stack):
		s = stack[-1]
		stack.pop()
		if not visited[s]:
			visited[s] = True
		for node in adj[s]:
			if not visited[node]:
				stack.append(node)

def solve():
	(n, m) = num_input()
	if n == m:
		print('01' * n)
	elif n > m:
		if n - m > 1:
			print(-1)
			return
		else:
			print('01' * m + '0')
	else:
		ans = ''
		flag = False
		while m > 1 and n > 0:
			if abs(m - n) == 1:
				flag = True
				break
			ans += '11'
			m -= 2
			if abs(m - n) == 1:
				break
			ans += '0'
			n -= 1
		if abs(n - m) == 1:
			if flag:
				if n > m:
					ans = '0' + ans + '10' * m
				else:
					ans += '10' * n + '1'
			elif n > m:
				ans += '01' * m + '0'
			else:
				ans += '01' * n + '1'
			print(ans)
		else:
			print(-1)
t = 1
for _ in range(t):
	solve()


import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def rinput():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
mod = int(1000000000.0) + 7
(n, m) = rinput()
if m > 2 * n + 2 or n > m + 1:
	print(-1)
elif n >= m:
	ans = '01' * m
	if n > m:
		ans += '0'
	print(ans)
elif m == 2 * n + 2:
	ans = '110' * n + '11'
	print(ans)
else:
	ans = '10' * n + '1'
	m -= n + 1
	if m == 0:
		print(ans)
	else:
		ans = ans.replace('1', '11', m)
		print(ans)


(x, y) = list(map(int, input().split()))
if 2 * (x + 1) < y:
	print(-1)
	exit(0)
if x > y + 1:
	print(-1)
	exit(0)
if x == y + 1:
	print('0' + '10' * y)
elif x == y:
	print('10' * y)
elif 2 * x > y:
	t = y - x
	print('110' * t + '10' * (x - t))
elif 2 * x == y:
	print('110' * x)
else:
	t = y - 2 * x
	print('110' * x + '1' * t)


R = lambda : map(int, input().rstrip().split())
(n, m) = R()
if m < n - 1 or n < (m - 1) // 2:
	print(-1)
	exit()
m -= n - 1
if m == 0:
	s = '0' + '10' * (n - 1)
elif m - 1 <= n:
	s = '110' * (m - 1) + '10' * (n - m + 1)
else:
	s = '110' * n + '1' * (m - 1 - n)
print(s)


(n, m) = map(int, input().split())
if m == n - 1:
	print('0' + m * '10')
elif m == n:
	print('10' * n)
elif m > n and m <= 2 * (n + 1):
	ans = '10' * n
	ans = list(ans)
	k = m - n
	for i in range(len(ans)):
		if ans[i] == '1' and k > 0:
			ans[i] = '2'
			k -= 1
	ans = ''.join(ans).replace('2', '11')
	ans += '1' * k
	print(ans)
else:
	print(-1)


(n, m) = map(int, input().split())
checker = True
if n >= m / 2 - 1 and n <= m + 1:
	a = min(m // 2, n)
	m -= 2 * a
	n -= a
	answer = '110' * a
	a += 1
	if m < 3:
		answer += '1' * m
		a += m
	else:
		checker = False
	if n <= a:
		c = answer.count('11')
		answer = answer.replace('11', '101', min(c, n))
		if n - c == 2:
			answer = '0' + answer + '0'
		elif n - c == 1:
			answer = '0' + answer
		elif n - c > 2:
			checker = False
	else:
		checker = False
else:
	checker = False
print(answer if checker else -1)


import random
import math
from collections import defaultdict
import itertools
from sys import stdin, stdout
import sys
import operator
from decimal import Decimal
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()

def main():
	(n, m) = [int(i) for i in input().split()]
	if m > 2 * (n + 1):
		print(-1)
	elif n > m + 1:
		print(-1)
	else:
		s = ''
		if m == 2 * (n + 1):
			s += '11'
			m -= 2
		elif m == 2 * n + 1:
			s += '1'
			m -= 1
		while n > 0:
			s += '0'
			if m > 1 and m > n:
				s += '11'
				m -= 2
			elif m > 0:
				s += '1'
				m -= 1
			n -= 1
		print(s)
main()


(n, m) = map(int, input().split())
arr = [0] * 3000001
if n - 1 <= m and m <= 2 * (n + 1):
	ans = ''
	if m == n - 1:
		arr[0] = -1
		arr[m + 1] = -1
		t = n - 1
	elif m == n:
		arr[m + 1] = -1
		t = n
	else:
		t = n + 1
	k = m % t
	if k == 0 and m != t:
		k = n + 1
	if arr[0] == -1:
		ans += '0'
	for i in range(1, n + 1):
		if arr[i] != -1:
			if k > 0:
				ans += '110'
			else:
				ans += '10'
			k -= 1
	if arr[m + 1] != -1:
		if k > 0:
			ans += '11'
		else:
			ans += '1'
	print(ans)
else:
	print('-1')


from collections import Counter, defaultdict
from math import factorial as fact
(n, m) = [int(x) for x in input().split()]
if n > m + 1 or (m - 2) / n > 2:
	print(-1)
elif n == m + 1:
	print('01' * m + '0')
elif n == m:
	print('01' * m)
else:
	while m > n and n != 0:
		print('110', end='')
		m -= 2
		n -= 1
	ok = False
	while m != n:
		ok = True
		print('1', end='')
		m -= 1
	if ok:
		print('01' * m)
	else:
		print('10' * m)


import sys
input = sys.stdin.readline
(y, x) = map(int, input().split())
total = x + y
s = []
count = 0
if x > y:
	s.append(1)
	count = 1
	x = x - 1
else:
	s.append(0)
	y = y - 1
while len(s) != total:
	if x > y:
		if s[-1] == 0:
			x = x - 1
			count = 1
			s.append(1)
		elif count < 2:
			s.append(1)
			x = x - 1
			count = count + 1
		elif y > 0:
			s.append(0)
			y = y - 1
			count = 0
		else:
			print('-1')
			exit()
	elif x < y:
		if s[-1] == 0:
			if x > 0:
				s.append(1)
				x = x - 1
				count = 1
			else:
				print('-1')
				exit()
		elif s[-1] == 1:
			s.append(0)
			y = y - 1
			count = 0
	elif x == 0 and y == 0:
		print(''.join(map(str, s)))
		exit()
	elif s[-1] == 1:
		s.append(0)
		y = y - 1
	else:
		s.append(1)
		count = 1
		x = x - 1
print(''.join(map(str, s)))


(n, m) = [int(k) for k in input().split()]
if m > 2 * n + 2 or m < n - 1:
	print(-1)
else:
	res = []
	c = m - n + 1
	for j in range(n - 1):
		res.append(0)
		res.append(1)
		if c > 0:
			res.append(1)
			c -= 1
	res.append(0)
	for j in range(min(2, c)):
		res.append(1)
		c -= 1
	q = []
	for j in range(min(2, c)):
		q.append(1)
		c -= 1
	print(''.join([str(k) for k in q + res]))


import sys
input = sys.stdin.readline
(x, y) = map(int, input().split())
if y + 1 < x or 2 * x + 2 < y:
	print(-1)
	exit()
if x > y:
	print('01' * y + '0')
else:
	str1 = ''
	while y > x and x:
		str1 += '110'
		y -= 2
		x -= 1
	if x == y:
		str1 += '10' * y
		y -= y
		x -= x
	if y:
		str1 += '1' * y
	print(str1)


def solve(n, m):
	if 2 * (n + 1) < m:
		print(-1)
		return
	elif m < n - 1:
		print(-1)
		return
	else:
		s = ''
		if m == n - 1:
			s += '0' + '10' * m
		elif m == 2 * n:
			s += '110' * n
		elif m == n:
			s += '10' * m
		else:
			s += (m - n) * '110'
			odd = 0
			(m, n) = (m - 2 * (m - n), n - (m - n))
			if m + n < 0:
				s = s[:m + n]
			if m > 0 and n > 0:
				if m == n:
					s += '10' * m
				if m == n + 1:
					s += '1' + '10' * n
				if m + 1 == n:
					s += '10' * m
					s = '0' + s
		print(s)
(n, m) = input().split()
(n, m) = (int(n), int(m))
solve(n, m)


(n, m) = map(int, input().split())
if m < n - 1:
	print('-1')
elif m == n - 1:
	print('0' + '10' * m)
elif m == n:
	print('10' * m)
elif m == n + 1:
	print('10' * n + '1')
else:
	k = m - (n + 1)
	if k > n + 1:
		print('-1')
	elif k == n + 1:
		print('110' * n + '11')
	else:
		print('110' * k + '10' * (n - k) + '1')


(n, m) = (int(x) for x in input().split())
if m < n - 1:
	print(-1)
	exit()
if m > (n + 1) * 2:
	print(-1)
	exit()
if n == m + 1:
	print('0', '10' * m, sep='')
	exit()
total = (m - n) // 2 * 3 + min(m - (m - n) // 2 * 2, n - (m - n) // 2) * 2
can = min(m, n * 2)
print('110' * (can - n), end='')
print('10' * (n * 2 - can), end='')
print('1' * (m - can))


inputs = input().split(' ')
ones = int(inputs[1])
zeroes = int(inputs[0])
if zeroes == 1 and ones == 0:
	print('0')
elif ones > (zeroes + 1) * 2:
	print(-1)
elif ones < zeroes - 1:
	print(-1)
else:
	startones = ones
	startzeroes = zeroes
	totalsize = startones + startzeroes
	loop = min(ones - zeroes, zeroes)
	if ones > zeroes:
		print('110' * loop, end='')
		zeroes -= loop
		ones -= 2 * loop
	if zeroes > ones:
		print('0', end='')
		zeroes -= 1
	if zeroes == ones:
		print('10' * ones, end='')
	if ones > 0 and zeroes == 0:
		print('1' * ones, end='')
	print()


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
(n, m) = map(int, input().split())
ans = ''
if m >= n:
	if m > 2 * n + 2:
		print(-1)
	else:
		while m - n > 1:
			ans += '1'
			ans += '1'
			if n != 0:
				ans += '0'
				n -= 1
			m -= 2
		while n > 0:
			ans += '1'
			ans += '0'
			m -= 1
			n -= 1
		if m != 0:
			ans += '1'
		print(ans)
elif n > m + 1:
	print(-1)
else:
	while m != 0:
		ans += '0'
		ans += '1'
		m -= 1
	ans += '0'
	print(ans)


arr = [int(x) for x in input().split()]
(n, m) = (arr[0], arr[1])
if n > m + 1 or m > 2 * (n + 1):
	print(-1)
else:
	ans = ''
	if m == n:
		for i in range(n):
			ans += '10'
	elif n > m:
		while m > 0:
			ans += '01'
			m -= 1
			n -= 1
		if n == 1:
			ans = ans + '0'
	else:
		while n > 0:
			if m > n:
				ans += '110'
				m -= 2
				n -= 1
			elif m == n:
				ans += '10'
				m -= 1
				n -= 1
		if m == 1:
			ans = ans + '1'
		elif m == 2:
			ans = ans + '11'
	print(ans)


(n, m) = map(int, input().split())
if m < n - 1 or m > 2 * n + 2:
	print(-1)
elif m == n - 1:
	ans = '01' * m + '0'
	print(ans)
else:
	k = m - n
	lt = []
	for i in range(n):
		lt.append('10')
	for i in range(k):
		if i < len(lt):
			lt[i] = '110'
		else:
			lt.append('1')
	print(''.join(lt))


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest, nsmallest
from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
mod = pow(10, 9) + 7
mod2 = 998244353

def data():
	return sys.stdin.readline().strip()

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def l():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
(n, m) = sp()
if (n + 1) * 2 >= m >= n - 1:
	doubles = min(m // 2, m - n + 1)
	answer = []
	if n > m // 2:
		answer.append(0)
		n -= 1
	for i in range(doubles):
		answer.append(11)
		m -= 2
		answer.append(0)
		n -= 1
	if n == -1:
		answer.pop()
	while True:
		if m > 0:
			answer.append(1)
			m -= 1
		if n > 0:
			answer.append(0)
			n -= 1
		if n <= 0 and m <= 0:
			break
	out(''.join(map(str, answer)))
	exit()
out(-1)


(n, m) = map(int, input().split())
if m <= 2 * (n + 1) and m >= n - 1:
	if n == m:
		s = '01' * n
		print(s)
	elif n < m:
		s = ''
		while True:
			if n == m or n <= 0 or m <= 0:
				break
			s += '110'
			m -= 2
			n -= 1
		if n == m and n != 0 and (m != 0):
			x = '10' * n
			print(s + x)
		elif n == 0 and m != 0:
			x = '1' * m
			print(s + x)
		elif n != 0 and m == 0:
			x = '0' * n
			print(s + x)
		else:
			print(s)
	elif n > m:
		s = '01' * m
		s += '0'
		print(s)
else:
	print(-1)


def make(n, m):
	string = ''
	for i in range(m - n + 1):
		string += '011'
	for i in range(2 * n - m - 2):
		string += '01'
	string += '0'
	return string
(n, m) = map(int, input().split())
if m > 2 * n + 2:
	print(-1)
elif m < n - 1:
	print(-1)
elif m <= 2 * n - 2:
	print(make(n, m))
elif m == 2 * n - 1:
	print(make(n, 2 * (n - 1)) + '1')
elif m == 2 * n:
	print(make(n, 2 * (n - 1)) + '11')
elif m == 2 * n + 1:
	print('1' + make(n, 2 * (n - 1)) + '11')
else:
	print('11' + make(n, 2 * (n - 1)) + '11')


(n, m) = map(int, input().split())
n += 1
print(-1 if m < n - 2 or 2 * n < m else '0'.join(('1' * (m // n + (i % n < m % n)) for i in range(-1, n - 1))))


(n, m) = list(map(int, input().split()))
m2 = m - 2
if n > m and n - m > 1 or n < m2 / 2:
	print(-1)
	exit()
p = False
out = ''
if n > m:
	p = True
	n -= 1
elif m - n >= 2:
	out += '11'
	m -= 2
out += '011' * (m - n)
n -= m - n
out += '01' * n
if p is True:
	out += '0'
print(out)


(n, m) = map(int, input().split())
if m > 2 * (n + 1) or m < n - 1:
	print('-1')
	exit()
string = ''
while m > n and n != 0:
	string += '110'
	m -= 2
	n -= 1
while n > 0 and m > 0:
	string += '10'
	m -= 1
	n -= 1
if m > 0:
	string += '1' * m
elif n > 0:
	string = '0' + string
print(string)


(n, m) = map(int, input().split())
if m > 2 * n + 2 or n > m + 1:
	print('-1')
elif n == m + 1:
	for q in range(m):
		print('01', end='')
	print('0')
elif n == m:
	for qq in range(m):
		print('01', end='')
elif m == n + 1:
	for qqq in range(n):
		print('10', end='')
	print('1')
elif m == 2 * n + 2:
	for qqqq in range(n):
		print('110', end='')
	print('11')
elif m == 2 * n + 1:
	for s in range(n):
		print('110', end='')
	print('1')
elif m == 2 * n:
	for qqqqq in range(n):
		print('110', end='')
elif n < m:
	for qqqqqq in range(m - n):
		print('110', end='')
	for qqqqqqq in range(2 * n - m):
		print('10', end='')


(z, o) = map(int, input().split())
if z - o > 1:
	print('-1')
elif o > 2 * (z + 1):
	print('-1')
else:
	ans = ''
	if o >= 2 * z:
		ans += '110' * z
		o -= 2 * z
		ans += '1' * o
		print(ans)
	elif z - o == 1:
		ans += '01' * o
		ans += '0'
		print(ans)
	elif o == z:
		print('10' * o)
	elif o > z:
		diff = o - z
		ans += '110' * diff
		ans += '10' * (z - diff)
		print(ans)


(zeros, ones) = map(int, input().split())
x = min(zeros, ones)
zeros -= x
ones -= x
if zeros > 0:
	if zeros == 1:
		print('0' + '10' * x)
	else:
		print(-1)
elif ones > 0:
	if ones > x + 2:
		print(-1)
	else:
		print('110' * min(ones, x) + '10' * max(x - ones, 0) + '1' * max(ones - x, 0))
else:
	print('10' * x)


(n, m) = list(map(int, input().split()))
if n > m + 1 or (m % 2 == 0 and n < m // 2 - 1) or (m % 2 == 1 and n < m // 2):
	print(-1)
else:
	if n == m + 1 or n == m:
		ans = '0' + '10' * m
		ans = ans[:n + m]
		print(ans)
		exit()
	cnt = n - m // 2 + 1 - m % 2
	a = ['1', '0'] * (2 * cnt)
	l = len(a)
	if n + m > l:
		a += ['1', '1', '0'] * (n + m - l)
	a = a[:n + m]
	print(''.join(a))


(n, m) = list(map(int, input().split()))
if m not in range(n - 1, 2 * (n + 1) + 1):
	print(-1)
	exit()
ans = ['0'] * n
for i in range(n):
	if m:
		ans[i] += '1'
		m -= 1
	if not m:
		break
for i in range(n):
	if m:
		ans[i] += '1'
		m -= 1
	if not m:
		break
ans[0] = '1' * min(m, 2) + ans[0]
m -= min(m, 2)
if not m:
	print(''.join(ans))
else:
	print(-1)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))

def can(n, m):
	if (n + 1) * 2 < m or n - 1 > m:
		return 0
	return 1
(n, m) = I()
if not can(n, m):
	print(-1)
else:
	k = max(min(n, m - n), 0)
	s = '1' * (m - 2 * n) + k * '011' + (min(n, m) - k) * '01' + '0' * (n > m)
	print(s)


(n, m) = [int(x) for x in input().split()]
if not (m >= n - 1 and m <= 2 * (n + 1)):
	print(-1)
elif m == n - 1:
	print('01' * (n - 1), end='')
	print('0')
elif m == n:
	print('01' * n)
else:
	doubles = m - (n + 1)
	ones = []
	for i in range(doubles):
		ones.append('11')
	while len(ones) < n + 1:
		ones.append('1')
	res = []
	for i in ones:
		res.append(i)
		res.append('0')
	res.pop()
	print(''.join(res))


(n, m) = map(int, input().split())
slots = 2 * (n + 1)
if slots < m or m < n - 1:
	print(-1)
else:
	sol = ''
	ones_surplus = m - n + 1
	if ones_surplus == 0:
		sol += '0'
	elif ones_surplus == 1:
		sol += '10'
		ones_surplus -= 1
	elif ones_surplus >= 2:
		sol += '110'
		ones_surplus -= 2
	for i in range(1, n):
		if ones_surplus >= 1:
			sol += '110'
			ones_surplus -= 1
		else:
			sol += '10'
	if ones_surplus == 1:
		sol += '1'
	elif ones_surplus == 2:
		sol += '11'
	print(sol)


def main():
	import sys
	(a, b) = map(int, sys.stdin.readline().split())
	if a > b:
		if a - b == 1:
			s = ''
			for i in range(a + b):
				if i & 1:
					s += '1'
				else:
					s += '0'
		else:
			s = '-1'
	elif b > a:
		if b <= 2 * (a + 1):
			s = ''
			if b - a == 1:
				for i in range(a + b):
					if i & 1:
						s += '0'
					else:
						s += '1'
			else:
				n = b - a - 1
				i = 0
				flag = 0
				while i < a + b:
					if flag & 1:
						s += '0'
					elif n:
						s += '11'
						n -= 1
						i += 1
					else:
						s += '1'
					i += 1
					flag = ~flag
		else:
			s = '-1'
	else:
		s = ''
		for i in range(a + b):
			if i & 1:
				s += '1'
			else:
				s += '0'
	sys.stdout.write(s)
main()


from sys import stdout
(n, m) = map(int, input().split())
if m < n - 1:
	stdout.write('-1')
elif m > 2 * (n + 1):
	stdout.write('-1')
else:
	todo = m - (n - 1)
	x = min(todo, 2)
	todo -= x
	stdout.write('1' * x)
	for i in range(n - 1):
		stdout.write('0')
		temp = min(todo, 1)
		stdout.write('1' * (1 + temp))
		todo -= temp
	stdout.write('0')
	stdout.write('1' * todo)


import math

def facts(n):
	ans = []
	for i in range(2, int(math.sqrt(n) + 1)):
		if n % i == 0:
			ans.append(i)
			ans.append(n // i)
	ans = sorted(ans)
	return ans
(n, m) = map(int, input().split())
tn = int(n)
if n > m + 1 or m - 2 * n >= 3:
	print(-1)
elif n > m:
	s = '01' * m + '0'
	print(s)
else:
	s = ''
	mult = 0
	while m - 2 > n - 1 and n:
		dif = (m - n) // 2
		m -= dif * 2
		n -= dif
		mult += dif
	s += '110' * mult
	rem = min(n, m)
	s += '10' * rem
	n -= rem
	m -= rem
	while n or m:
		if m > 0:
			s += '1'
			m -= 1
		if n > 0:
			s += '0'
			n -= 1
	print(s)


import sys, math, itertools, random, bisect
from collections import defaultdict
INF = 10 ** 18

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 10 ** 9 + 7
test = 1
for _ in range(test):
	(n, m) = get_ints()
	a = get_array()
	if n < (n + m) // 3 or n > math.ceil((n + m) / 2):
		print(-1)
	else:
		ans = ''
		if m + 1 == n:
			for i in range(n + m):
				if i & 1:
					ans += '1'
				else:
					ans += '0'
		elif n + 1 == m:
			for i in range(n + m):
				if i & 1:
					ans += '0'
				else:
					ans += '1'
		else:
			while m and n and (m - n > 1):
				ans += '110'
				n -= 1
				m -= 2
			while m or n:
				if m:
					ans += '1'
					m -= 1
				if n:
					ans += '0'
					n -= 1
		print(ans)


(n0, n1) = map(int, input().split(' '))
if n0 > n1 + 1 or n1 > 2 * (n0 + 1):
	print(-1)
elif n0 > n1:
	li = ['01'] * (n0 - 1)
	li.append('0')
	print(''.join(li))
elif n1 <= 2 * n0:
	li = ['110'] * (n1 - n0)
	li2 = ['10'] * (2 * n0 - n1)
	li += li2
	print(''.join(li))
else:
	li = ['110'] * n0
	li2 = ['1'] * (n1 - 2 * n0)
	li += li2
	print(''.join(li))


(n, m) = map(int, input().split())
if m > 2 * n + 2:
	print(-1)
elif m < n - 1:
	print(-1)
elif n >= m:
	print('01' * m + '0' * (n - m))
else:
	l = [1, 0] * n
	l.append(1)
	m = m - (n + 1)
	for i in range(2 * n + 1):
		if m > 0:
			if l[i] != 0:
				l[i] = l[i] * 10 + 1
				m -= 1
		if m <= 0:
			break
	for i in l:
		print(i, end='')
	print()


(y, x) = map(int, input().split())
if x > 2 * (y + 1) or x < y - 1:
	print(-1)
else:
	t = 1 + y
	l = [0] * t
	for i in range(x):
		l[i % t] += 1
	j = 0
	f = False
	for i in range(len(l)):
		if l[i] == 0:
			j = i
			f = True
			break
	if f:
		l = l[:j + 1]
	p = []
	for i in l:
		p.append('1' * i)
	ans = '0'.join(p)
	if ans.count('0') < y:
		if y - ans.count('0') == 1:
			ans = '0' + ans
		elif y - ans.count('0') == 2:
			ans = '0' + ans + '0'
	print(ans)


I = lambda : list(map(int, input().split()))
(n, m) = I()
if m < n - 1 or n < (m + 1) // 2 - 1:
	print(-1)
elif m < n:
	print('01' * m + '0')
elif n == m:
	print('10' * n)
else:
	d = min(m - n, n)
	print('110' * d + '10' * (n - d) + '1' * (m - d - n))


import sys
(n, m) = map(int, input().split())
if n == m:
	print('01' * n)
	sys.exit(0)
if n > m + 1:
	print(-1)
	sys.exit(0)
if m > 2 * (n + 1):
	print(-1)
	sys.exit(0)
if m <= 2 * (n - 1):
	t = m - (n - 1)
	ans = '011' * t
	if n - 1 - t > 0:
		ans += '01' * (n - t - 1)
	ans = ans + '0'
else:
	m -= 2 * (n - 1)
	ans = '011' * (n - 1) + '0'
	if m <= 2:
		ans = '1' * m + ans
	else:
		ans = '1' * 2 + ans + '1' * (m - 2)
print(ans)


(n, m) = map(int, input().split())
if n - m > 1 or m > 2 * (n + 1):
	print(-1)
elif n > m:
	print('1'.join('0' * n))
elif n == m:
	print('01' * n)
else:
	x = m // (n + 1)
	y = m % (n + 1)
	print('0'.join(['1' * (x + 1)] * y + ['1' * x] * (n + 1 - y)))


def solve():
	(zeroes, ones) = map(int, input().split())
	max_pairs = (ones + 1) // 2
	if zeroes > ones + 1 or zeroes < (ones + 1) // 2 - 1:
		print(-1)
		return
	if ones + 1 == zeroes:
		print('1'.join(['0' for _ in range(zeroes)]))
	elif max_pairs == zeroes + 1:
		res = '0'.join(['11' for _ in range(max_pairs)])
		if ones % 2:
			res = res[:-1]
		print(res)
	else:
		if ones == zeroes * 2:
			tp = zeroes
		elif ones == zeroes:
			tp = 0
		else:
			tp = ones % zeroes
		op = zeroes - tp
		res = ''
		for _ in range(tp):
			res += '011'
		for _ in range(op):
			res += '01'
		print(res)
solve()


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans

def sieve_of_eratosthenes(n):
	ans = []
	arr = [1] * (n + 1)
	(arr[0], arr[1], i) = (0, 0, 2)
	while i * i <= n:
		if arr[i] == 1:
			j = i + i
			while j <= n:
				arr[j] = 0
				j += i
		i += 1
	for k in range(n):
		if arr[k] == 1:
			ans.append(k)
	return ans

def nc2(x):
	if x == 1:
		return 0
	else:
		return x * (x - 1) // 2

def kadane(x):
	sum_so_far = 0
	current_sum = 0
	for i in x:
		current_sum += i
		if current_sum < 0:
			current_sum = 0
		else:
			sum_so_far = max(sum_so_far, current_sum)
	return sum_so_far
from math import *
for _ in range(1):
	(n, m) = map(int, input().split())
	if m > 2 * n + 2 or n > m + 1:
		print(-1)
	elif n >= m:
		print('01' * m + '0' * (n > m))
	else:
		print(('10' * n + '1').replace('1', '11', m - n - 1))


(zero, ones) = map(int, input().split())
ans = ''
if ones < zero - 1 or ones > 2 * zero + 2:
	print(-1)
	exit(0)
if ones == zero - 1:
	while ones > 0 and zero > 0:
		print('01', end='')
		ones -= 1
		zero -= 1
	print('0')
else:
	while ones < zero * 2:
		print('10', end='')
		ones -= 1
		zero -= 1
	while ones > 0 and zero > 0:
		print('110', end='')
		ones -= 2
		zero -= 1
	if ones > 0:
		print('1' * ones, end='')


(n, m) = map(int, input().split())
if m > 2 * (n + 1) or n > m + 1:
	print(-1)
elif n >= m:
	print(''.join((str(i % 2) for i in range(n + m))))
elif m == 2 * (n + 1):
	print('110' * n + '11')
elif m == 2 * n + 1:
	print('110' * (m - n - 1) + '1')
else:
	print('110' * (m - n) + '10' * (2 * n - m))


from collections import deque, Counter, OrderedDict
from heapq import nsmallest, nlargest
from math import ceil, floor, log, log2, sqrt, gcd, factorial, pow, pi

def binNumber(n, size=4):
	return bin(n)[2:].zfill(size)

def iar():
	return list(map(int, input().split()))

def ini():
	return int(input())

def isp():
	return map(int, input().split())

def sti():
	return str(input())

def par(a):
	print(' '.join(list(map(str, a))))

def tdl(outerListSize, innerListSize, defaultValue=0):
	return [[defaultValue] * innerListSize for i in range(outerListSize)]

def sts(s):
	s = list(s)
	s.sort()
	return ''.join(s)

class pair:

	def __init__(self, f, s):
		self.fi = f
		self.se = s

	def __lt__(self, other):
		return (self.fi, self.se) < (other.fi, other.se)
(a, b) = isp()
if b > (a + 1) * 2:
	print(-1)
	quit()
if a > b + 1:
	print(-1)
	quit()
if a == b + 1:
	s = '0'
	s += '10' * b
	print(s)
	quit()
if a == b:
	print('10' * a)
	quit()
s = ''
while True:
	if b > a:
		if b == 1:
			s += '1'
			b = 0
		else:
			s += '11'
			b -= 2
		if a > 0:
			s += '0'
			a -= 1
	elif b == a:
		s += '10' * b
		b = 0
		a = 0
	if b <= 0 and a <= 0:
		break
print(s)


def isValid(oneCount, zeroCount, remLength):
	isValid = 1
	maxZero = int((remLength + 1) / 2)
	minZero = int(remLength / 3)
	if zeroCount > maxZero or zeroCount < minZero:
		isValid = 0
	maxOne = remLength % 3 + int(remLength / 3) * 2
	minOne = int(remLength / 2)
	if oneCount > maxOne or oneCount < minOne:
		isValid = 0
	return isValid

def main():
	(zero, one) = list(map(int, input().split()))
	arr = []
	oneCount = 0
	zeroCount = 0
	sol = ''
	n = one + zero
	if isValid(one, zero, n):
		for i in range(n):
			remLength = n - i
			if one > 0 and isValid(one - 1, zero, remLength - 1) and (oneCount != 2):
				one = one - 1
				oneCount = oneCount + 1
				zeroCount = 0
				arr.append('1')
			else:
				zero = zero - 1
				zeroCount = zeroCount + 1
				oneCount = 0
				arr.append('0')
		print(''.join(arr))
	else:
		print(-1)
main()


def main():
	(m, n) = map(int, input().split())
	if m - n == 1:
		print('0' + '10' * n)
	elif 0 <= n - m <= m + 2:
		if n == 2:
			if m == 1:
				print('101')
				return
		if n - m >= m:
			print('110' * m + '1' * (n - m - m))
		else:
			print('110' * (n - m) + '10' * (m - (n - m)))
	else:
		print('-1')
main()


(n, m) = map(int, input().strip().split())
if m > 2 * n + 2 or m < n - 1:
	print('-1')
	exit(0)
if m == n - 1:
	s = '01' * (n - 1)
	print(s + '0')
	exit(0)
c = m - n
t = ''
k = 0
if m > 2 * n:
	c = n
	k += m - 2 * n
t = '1' * k
s = '011' * c
n -= c
p = '01' * n
print(t + p + s)


import sys
input = sys.stdin.readline
(n, m) = map(int, input().split())
if 2 * (n + 1) < m:
	print(-1)
elif n - 1 > m:
	print(-1)
else:
	t1 = m // 2
	t2 = n
	pp = min(t1, t2)
	k = '110' * pp
	if pp * 2 < m:
		k += '1' * (m - 2 * pp)
	if pp < n:
		k = k.replace('110', '1010', n - pp)
		h = k.count('0')
		if n - h == 1:
			if k[0] == '0':
				print(k + '0')
			else:
				print('0' + k)
		elif n - h == 2:
			print('0' + k + '0')
		else:
			print(k)
	else:
		print(k)


(n, m) = map(int, input().split())
if n < m // 2 + 1 * (m % 2 != 0) - 1 or m < n - 1:
	print(-1)
else:
	s = ''
	if n < m:
		dif = m - n
		s += '110' * min(dif, n)
		m -= 2 * min(dif, n)
		n -= min(dif, n)
		while m > 0 and n > 0:
			s += '10'
			m -= 1
			n -= 1
		while m > 0:
			s += '1'
			m -= 1
	else:
		s += '01' * m
		n -= m
		if n > 0:
			s += '0'
	print(s)


from sys import stdin
(n, m) = map(int, stdin.readline().rstrip().split(' '))
if m - 2 > 2 * n or n - 1 > m:
	print(-1)
else:
	g = max(min(m - n, n), 0)
	print('1' * (m - n * 2) + g * '011' + (min(n, m) - g) * '01' + '0' * (n > m))


(n, m) = map(int, input().split())
if n == 1:
	l = '0' * n
	min1 = 0
	max1 = 4
	if m >= min1 and m <= max1:
		if m > 0:
			if m >= 2:
				l = '1' + l
				l = '1' + l
				m = m - 2
			else:
				l = '1' + l
				m = m - 1
		if m > 0:
			if m >= 2:
				l = l + '1'
				l = l + '1'
				m = m - 2
			else:
				l = l + '1'
				m = m - 1
		print(l)
	else:
		print('-1')
else:
	min1 = n - 1
	max1 = (n + 1) * 2
	if m >= min1 and m <= max1:
		if m >= (n - 1) * 2:
			l1 = '011' * (n - 1)
			m = m - 2 * (n - 1)
		else:
			y = n - 1
			m = m - (n - 1)
			l1 = '011' * m
			x = '01' * (y - m)
			l1 = l1 + x
			m = 0
		l1 = l1 + '0'
		if m > 0:
			if m >= 2:
				l1 = '1' + l1
				l1 = '1' + l1
				m = m - 2
			else:
				l1 = '1' + l1
				m = m - 1
		if m > 0:
			if m >= 2:
				l1 = l1 + '1'
				l1 = l1 + '1'
				m = m - 2
			else:
				l1 = l1 + '1'
				m = m - 1
		print(l1)
	else:
		print('-1')


import math
test = 1
for tes in range(test):
	(n, m) = list(map(int, input().split()))
	if m >= 2 * n:
		m = m - 2 * n
		if m > 2:
			print(-1)
			continue
		print('110' * n + '1' * m)
	elif n > m + 1:
		print(-1)
	elif n == m + 1:
		print('01' * m + '0')
	else:
		print('110' * (m - n) + '10' * (2 * n - m))


from sys import stdin, stdout
(zero, one) = map(int, stdin.readline().split())
if one < zero - 1:
	print(-1)
elif one > zero * 2 + 2:
	print(-1)
else:
	ans = ''
	if zero > one:
		print(0, end='')
		while zero > 1:
			ans += '10'
			zero -= 1
	elif zero == one and zero % 2 == 0:
		while zero > 0:
			ans += '1010'
			zero -= 2
	elif zero == one and zero % 2 != 0:
		ans += '10'
		while zero > 1:
			ans += '1010'
			zero -= 2
	else:
		i = 0
		while one > zero:
			if i % 2 == 0:
				ans += '11'
				one -= 2
			else:
				ans += '0'
				zero -= 1
			i += 1
		i = 0
		while one or zero:
			if i % 2 == 0:
				ans += '0'
				zero -= 1
			else:
				ans += '1'
				one -= 1
			i += 1
	stdout.write(ans)