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:
/* IMPORTANT: Multiple classes and nested static classes are supported */
 
/*
 * uncomment this if you want to read input.
import java.io.BufferedReader;
import java.io.InputStreamReader;
*/
import java.util.*;
import java.io.*;
public class Astone {
private static InputStream stream;
private static byte[] buf=new byte[1024];
private static int curChar;
private static int numChars;
private static PrintWriter pw;
private static SpaceCharFilter filter;
    public static void main(String args[] ) throws Exception 
    {
    	InputReader(System.in);
    	pw=new PrintWriter(System.out);
    	soln();
    	pw.close();
    }
    public static void soln()
    {
    	String s=nextLine();
    	int last=s.charAt(s.length()-1)-'0';
    	char ans[]=s.toCharArray();
    	int t=0;
    	int j=-1;
        for(int i=0;i<s.length();i++)
        {
        	int m=s.charAt(i)-'0';
        	if(m%2==0)
        	{
        		if(m<last)
        		{
        			ans[i]=(char)(last+'0');
        			ans[s.length()-1]=(char)(m+'0');
        			String dd=new String(ans);
        			System.out.println(dd);
        			System.exit(0);
        		}
        		j=i;
        		t++;
        	}
        }
        if(t==0)
        	System.out.println("-1");
        else
        {
        	char temp=ans[j];
        	ans[j]=ans[ans.length-1];
        	ans[ans.length-1]=temp;
        	String dd=new String(ans);
        	System.out.println(dd);
        }
    	
    }
    
	

private static int Search(String[] aage, String h) {
for(int i=0;i<aage.length;i++)
{
	if(aage[i].equals(h))
		return i;
}
		return -1;
	}
public static void InputReader(InputStream stream1) {
	stream = stream1;
}
 
private static boolean isWhitespace(int c) {
	return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
 
private static boolean isEndOfLine(int c) {
	return c == '\n' || c == '\r' || c == -1;
}
 
private static 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++];
}
 
private static 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;
}
 
private static 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;
}
 
private static String nextToken() {
	int c = read();
	while (isSpaceChar(c))
		c = read();
	StringBuilder res = new StringBuilder();
	do {
		res.appendCodePoint(c);
		c = read();
	} while (!isSpaceChar(c));
	return res.toString();
}
 
private static String nextLine() {
	int c = read();
	while (isSpaceChar(c))
		c = read();
	StringBuilder res = new StringBuilder();
	do {
		res.appendCodePoint(c);
		c = read();
	} while (!isEndOfLine(c));
	return res.toString();
}
 
private static int[] nextIntArray(int n) {
	int[] arr = new int[n];
	for (int i = 0; i < n; i++) {
		arr[i] = nextInt();
	}
	return arr;
}
  
private static long[] nextLongArray(int n) {
	long[] arr = new long[n];
	for (int i = 0; i < n; i++) {
		arr[i] = nextLong();
	}
	return arr;
}
 
private static void pArray(int[] arr){
	for (int i=0; i<arr.length; i++) {
		System.out.print(arr[i] + " ");
	}
	System.out.println();
	return;
}
 
private static void pArray(long[] arr){
	for (int i=0; i<arr.length; i++) {
		System.out.print(arr[i] + " ");
	}
	System.out.println();
	return;		
}
 
private static boolean isSpaceChar(int c) {
	if (filter != null)
		return filter.isSpaceChar(c);
	return isWhitespace(c);
}
 
private interface SpaceCharFilter {
	public boolean isSpaceChar(int ch);
}
 
}