using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var a = ReadLine().ToList(); var b = ReadLine().ToList(); if (a.Count < b.Count) a = Enumerable.Repeat('0', b.Count - a.Count).Concat(a).ToList(); if (a.Count > b.Count) b = Enumerable.Repeat('0', a.Count - b.Count).Concat(b).ToList(); var ans = 0; for (var i = 0; i < a.Count; ++i) { ans = ans * 2 + (a[i] - '0') ^ (b[i] - '0'); } WriteLine(ans); } }