#king x,y=(int(i) for i in input().split()) x2,y2=(int(i) for i in input().split()) if x==y: if x2==y2 and x2y: m=x else: m=y print(m)