IMO 1986 LL GRE40

Find the maximum value that the quantity 2m + 7n can have

IMO 1986 LL GRE40

Origin: GRE

Problem

Find the maximum value that the quantity 2m + 7n can have such that there exist distinct positive integers xi (1 \leqi \leqm), yj (1 \leqj \leq n) such that the xi’s are even, the yj’s are odd, and m i=1 xi +n j=1 yj = 1986.