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.InputStreamReader;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.StringTokenizer;

public class CodeForces {
	
	public static void main(String [] args) throws IOException {
//		String line = "asdasd";
//		line.charAt(0);
//		int i=1;
//		System.out.println();
		problem508b();
//		System.out.println(Integer.MAX_VALUE);
		
//		System.out.println(T.a);
	}
	
	public static void problem230b() {
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int[] a=new int[10000001];
		for(int i=2;i<=1000000;i++)
		{
			a[i]=1;
		}
		for(int i=2;i<=1000;i++)
		{
			for(int j=2*i;j<=1000000;j+=i)
			{
				a[j]=0;
			}
		}
		for(int i=0;i<n;i++)
		{
			long b=s.nextLong();
			double x=Math.sqrt(b);
			if(x==(int)x && a[(int)x]==1)
				System.out.println("YES");
			else
				System.out.println("NO");
		}
	}
	
	public static void problem508b() throws IOException {
//		Scanner s=new Scanner(System.in);
//		
//		String nn = s.nextLine();
//		
//		int last = Integer.parseInt(nn.charAt(nn.length()-1) + "");
//		
//		String pos = "";
//		
//		for(int i=0; i<nn.length()-1; i++) {
//			if( Integer.parseInt(nn.charAt(i) + "") % 2 != 0)
//				continue;
//			pos = nn.substring(0, i) + last + nn.substring(i+1, nn.length()-1) + nn.charAt(i);
//			if( Integer.parseInt(nn.charAt(i) + "") < last)
//				break;
//		}
//		
//		if(pos.equals(""))
//			System.out.println("-1");
//		else 
//			System.out.println(pos);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] aa = br.readLine().toCharArray();
		int n = aa.length;
		int x = aa[n - 1] - '0';
		int j = -1;
		for (int i = 0; i < n; i++) {
			int y = aa[i] - '0';
			if (y % 2 == 0) {
				j = i;
				if (y < x)
					break;
			}
		}
		if (j == -1)
			System.out.println(-1);
		else {
			char tmp = aa[j];
			aa[j] = aa[n - 1];
			aa[n - 1] = tmp;
			System.out.println(aa);
		}
		
	}
	
	public static void problem451b() {
		Scanner in = new Scanner(System.in);
		
		int n = in.nextInt();
		int [] inp = new int[n];
		int[] sorted = new int[n];
		
		
		for(int i=0; i<n; i++) {
			inp[i] = in.nextInt();
			sorted[i] = inp[i];
		}
		
		Arrays.sort(sorted);
		
		int wrongMin = 0;
		int wrongMax = 0;
		int wrongMinIn = 0;
		int wrongMaxIn = 0;
		
		for(int i=0; i<n; i++) {
			if(inp[i] != sorted[i]) {
				wrongMin = sorted[i];
				wrongMinIn = i;
				break;
			}
		}
		if(wrongMin == 0){
			System.out.println("yes");
			System.out.println("1 1");
			return ;
		}
		
		
		
		for(int i = n-1; i >= 0; i--) {
			if(inp[i] != sorted[i]) {
				wrongMax = sorted[i];
				wrongMaxIn = i;
				break;
			}
		}
		
		
//		for(int i=0; i<n-1; i++) {
//			if(wrongMin >= inp[i])
//				continue;
//			wrongMinIn = i;
//			break;
//		}
		
		
//		for(int i=0; i<n-1; i++) {
//			if(wrongMax <= inp[i])
//				continue;
//			wrongMaxIn = i;
//			break;
//		}
		if(wrongMinIn + 1 == wrongMaxIn) {
			System.out.println("yes");
			System.out.println(++wrongMinIn + " " + ++wrongMaxIn);
			return;
		}
		
		int a = 0;
		int wrongMinInc = wrongMinIn;
		int wrongMaxInc = wrongMaxIn;
		
		while(wrongMinIn < wrongMaxIn) {
			a = inp[wrongMaxIn];
			inp[wrongMaxIn] = inp[wrongMinIn];
			inp[wrongMinIn] = a;
			wrongMinIn++;
			wrongMaxIn--;
		}
			
		
		for(int i=0; i<n-1; i++) {
			if(inp[i]>inp[i+1]) {
				System.out.println("no");
				return;
			}
		}
		System.out.println("yes");
		System.out.println(++wrongMinInc + "  " + ++wrongMaxInc);
	}
	
	public static void problem71a() {
		
		
		Scanner in = new Scanner(System.in);
		
		int l = in.nextInt();
		int n = in.nextInt();
		int [] lamps = new int[l];
		for (int i=0; i<l; i++) {
			lamps[i] = in.nextInt();
		}
		
		Arrays.sort(lamps);
		
		double r = lamps[0] - 0;
		
		for (int i=0; i<l; i++) {
			r = Math.max(r, (double)(lamps[i] - (i==0?0:lamps[i-1]))/2);
			if(lamps[i] + r >= n)
				break;
		}
		r = Math.max(r, n - lamps[l-1]);
		DecimalFormat df = new DecimalFormat("0.0000000000");
		System.out.println(df.format(r));
	}

	
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer("");
			} catch (Exception e){e.printStackTrace();}
		}
		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}
		public int nextInt() {return Integer.parseInt(next());}
		public long nextLong() {return Long.parseLong(next());}
		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			try {line = br.readLine();}
			catch (Exception e) {e.printStackTrace();}
			return line;
		}
	}
}

class T 
{
	public static final Integer a = 9;
	
	static {
		System.out.println("static");
	}
}