import sequtils,strutils,algorithm,math,sugar,macros,strformat import sets,tables,intsets,queues,heapqueue,bitops template get*():string = stdin.readLine().strip() let n = get().parseInt() let X = get().split().map(parseInt) let Y = toSeq(X.sorted(cmp).mapIt(int(it mod 2 == 0)).toCountTable().values) if Y.len == 1:echo Y[0] else:echo abs(Y[1]-Y[0])