10101 10010
2
a=input().strip() b=input().strip() if len(a)!=len(b): print(-1) else: print(sum(x!=y for x,y in zip(a,b)))