N = int(input()) x_list = list(map(int, input().split())) x_list.sort() cnt0 = 0 cnt1 = len(x_list) while cnt0 != cnt1: tmp = [] while len(x_list) > 0: if len(x_list) == 1: tmp.append(x_list.pop(0)) break x0 = x_list.pop(0) x1 = x_list.pop(0) if (x0 + x1) % 2 == 0: tmp.append(x0) x_list.insert(0, x1) x_list = tmp cnt0 = cnt1 cnt1 = len(x_list) print(len(x_list))