Problem: Berland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected and the exchange rate is now assumed to be an integer.

Reliable sources have informed the financier Anton of some information about the exchange rate of currency you all know against the burle for tomorrow. Now Anton knows that tomorrow the exchange rate will be an even number, which can be obtained from the present rate by swapping exactly two distinct digits in it. Of all the possible values that meet these conditions, the exchange rate for tomorrow will be the maximum possible. It is guaranteed that today the exchange rate is an odd positive integer n. Help Anton to determine the exchange rate of currency you all know for tomorrow!

Input

The first line contains an odd positive integer n — the exchange rate of currency you all know for today. The length of number n's representation is within range from 2 to 105, inclusive. The representation of n doesn't contain any leading zeroes.

Output

If the information about tomorrow's exchange rate is inconsistent, that is, there is no integer that meets the condition, print  - 1.

Otherwise, print the exchange rate of currency you all know against the burle for tomorrow. This should be the maximum possible number of those that are even and that are obtained from today's exchange rate by swapping exactly two digits. Exchange rate representation should not contain leading zeroes.

Examples

Input

527


Output

572


Input

4573


Output

3574


Input

1357997531


Output

-1

Solution (in JAVA):

Solution:

					import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.InputMismatchException;
									public class Solution1 implements Runnable
									{
										static final long MAX = 1000000007L;
										static class InputReader
										{
											private InputStream stream;
											private byte[] buf = new byte[1024];
											private int curChar;
											private int numChars;
											private SpaceCharFilter filter;
											private BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
									 
											public InputReader(InputStream stream)
											{
												this.stream = stream;
											}
											
											public int read()
											{
												if (numChars==-1) 
													throw new InputMismatchException();
												
												if (curChar >= numChars)
												{
													curChar = 0;
													try 
													{
														numChars = stream.read(buf);
													}
													catch (IOException e)
													{
														throw new InputMismatchException();
													}
													
													if(numChars <= 0)				
														return -1;
												}
												return buf[curChar++];
											}
										 
											public String nextLine()
											{
												String str = "";
									            try
									            {
									                str = br.readLine();
									            }
									            catch (IOException e)
									            {
									                e.printStackTrace();
									            }
									            return str;
											}
											public int nextInt()
											{
												int c = read();
												
												while(isSpaceChar(c)) 
													c = read();
												
												int sgn = 1;
												
												if (c == '-') 
												{
													sgn = -1;
													c = read();
												}
												
												int res = 0;
												do 
												{
													if(c<'0'||c>'9') 
														throw new InputMismatchException();
													res *= 10;
													res += c - '0';
													c = read();
												}
												while (!isSpaceChar(c)); 
												
												return res * sgn;
											}
											
											public long nextLong() 
											{
												int c = read();
												while (isSpaceChar(c))
													c = read();
												int sgn = 1;
												if (c == '-') 
												{
													sgn = -1;
													c = read();
												}
												long res = 0;
												
												do 
												{
													if (c < '0' || c > '9')
														throw new InputMismatchException();
													res *= 10;
													res += c - '0';
													c = read();
												}
												while (!isSpaceChar(c));
													return res * sgn;
											}
											
											public double nextDouble() 
											{
												int c = read();
												while (isSpaceChar(c))
													c = read();
												int sgn = 1;
												if (c == '-') 
												{
													sgn = -1;
													c = read();
												}
												double res = 0;
												while (!isSpaceChar(c) && c != '.') 
												{
													if (c == 'e' || c == 'E')
														return res * Math.pow(10, nextInt());
													if (c < '0' || c > '9')
														throw new InputMismatchException();
													res *= 10;
													res += c - '0';
													c = read();
												}
												if (c == '.') 
												{
													c = read();
													double m = 1;
													while (!isSpaceChar(c)) 
													{
														if (c == 'e' || c == 'E')
															return res * Math.pow(10, nextInt());
														if (c < '0' || c > '9')
															throw new InputMismatchException();
														m /= 10;
														res += (c - '0') * m;
														c = read();
													}
												}
												return res * sgn;
											}
											
											public String readString() 
											{
												int c = read();
												while (isSpaceChar(c))
													c = read();
												StringBuilder res = new StringBuilder();
												do 
												{
													res.appendCodePoint(c);
													c = read();
												} 
												while (!isSpaceChar(c));
												
												return res.toString();
											}
										 
											public boolean isSpaceChar(int c) 
											{
												if (filter != null)
													return filter.isSpaceChar(c);
												return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
											}
										 
											public String next() 
											{
												return readString();
											}
											
											public interface SpaceCharFilter 
											{
												public boolean isSpaceChar(int ch);
											}
										}
									 	
										public static void main(String args[]) throws Exception
										{
											new Thread(null, new Solution1(),"Solution1",1<<26).start();
										}
										long gcd(long a, long b)
									    {
									        if (a == 0)
									            return b;
									         
									        return gcd(b%a, a);
									    }
									    // method to return LCM of two numbers
										 long lcm(long a, long b)
										    {
										        return (a*b)/gcd(a, b);
										    }
										
										public void run()
										{
											InputReader in= new InputReader(System.in);
											PrintWriter w= new PrintWriter(System.out);
											String s = in.next();
											boolean flag = false;
											ArrayList<Integer> great = new ArrayList();
											ArrayList<Integer> small = new ArrayList();
											for(int i = 0;i < s.length()-1;i++){
												if((s.charAt(i)-48)%2 == 0){
													int val = (s.charAt(i)-48);
													int err = s.charAt(s.length()-1)-48;
													if(val < err){
														great.add(i);
													}else{
														small.add(i);
													}
													flag = true;
												}
											}
											if(!flag){
												w.println("-1");
											}else{
												char[] ch = s.toCharArray(); 
												if(!great.isEmpty()){
													char temp = ch[s.length()-1];
													ch[s.length()-1] = ch[great.get(0)];
													ch[great.get(0)] = temp;
												}else{
													char temp = ch[s.length()-1];
													ch[s.length()-1] = ch[small.get(small.size()-1)];
													ch[small.get(small.size()-1)] = temp;
												}
												for(int i = 0;i < ch.length;i++){
													w.print(ch[i]);
												}
											}
											w.close();
										}
										
										static class Pair implements Comparable<Pair>{
											int a;
											int b;
											
											Pair(){}	
											Pair(int a,int b){
												this.a = a;
												this.b = b;
												
											}
											public int compareTo(Pair p){
												return Integer.compare(this.b,p.b);
											}
										}
						}