var a:array[1..1000000] of longint; n,i,max:longint; begin read(n); for i:=1 to n do read(a[i]); for i:=1 to n do if a[i]>max then max:=a[i]; for i:=1 to n do if a[i]=max then if a[i] mod 2=0 then write(a[i]*2,' ') else write(a[i]+1,' ') else write(a[i],' '); end. /************************************************************** Problem: 1581 User: admin Language: Pascal Result: Wrong Answer ****************************************************************/