NOI Contest Archive

Archive / 2021 / November 2021

Warzone

Easy · National Olympiad in Informatics Sri Lanka - November 2021

You are an intelligence agent in the warfront and you intercepted an enemy telegram.

The telegram reads, “The Americans have set out \(x\) number of fighter planes carrying atomic bombs. All \(y\) cities in the axis alliance are under threat!”

After near fatal consequences the troop could only obtain this critical information. The \(i\)\(th\) fighter plane is code named with an integer \(a\)\(i\) and is set out for an airstrike. The \(j\)\(th\) targeted city is coded with the integer \(b\)\(j\). Intelligence received states that bombs will only be deployed to the cities where the \(j\)\(th\) city code and ai code name of fighter plane amounts to an odd number.

All hope is on you, find the maximum number of cities under threat.

Input Format

Output Format

Print the maximum number of cities under threat.

Constraints

Sample Input 0

5 4
19 24 6 2 21
8 4 7 20

Sample Output 0

3

Sample Input 1

5 1
1 3 5 7 9 
6

Sample Output 1

1