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.util.*;
    import java.io.*;

    public class Main {

	static FastScanner scn = new FastScanner();
	static PrintWriter out = new PrintWriter(System.out);
	
	public static void main(String[] HastaLaVistaLa) {
		// Running Number Of TestCases (t)
		int t = 1;
		while(t-- > 0)
			solve();
		out.close();
	}

	public static void dummy(){
		int n = scn.nextInt();
		out.println();
	}

	static long MOD = 1000000007L;
	static long[] dp;
	public static void solve() {
		// Main Solution (AC)
		String s = scn.next();
		char[] ch = s.toCharArray();
		int n = ch.length;
		boolean check = false;
		for(char c : ch) {
			if((c-'0') % 2 ==0) check = true;
		}
		if(!check) out.println(-1);
		else {
			int last = ch[n-1] - '0';
			check = false;
			for(int i = 0; i < n; i++) {
				int dig = ch[i] - '0';
				if(dig % 2 == 0 && dig <= last) {
					ch[n-1] = (char) (dig + '0') ;
					ch[i] = (char) (last + '0') ;
					check = true;
					break;
				}
			}
			if(!check) {
				for(int i = n - 1; i >= 0; i--) {
					int dig = ch[i] - '0';
					if(dig % 2 == 0) {
						ch[n-1] = (char) (dig + '0') ; 
						ch[i] = (char) (last + '0') ;
						break;
					}
				}
			}

			for(char c : ch) out.print(c);
			out.println();
		}
	}

	public static long binpow(long n, long m, long mod) {
	        long res = 1;
	        while (m > 0) {
	            if (m % 2 == 1) {
	                res *= n;
	                res %= mod;
	                m--;
	            }
	            n *= n;
	            n %= mod;
	            m /= 2;
	        }
	        return res;
    	}

	public static HashMap<Character, Integer> CountFrequencies(char[] arr) {
		HashMap<Character, Integer> map = new HashMap<>();
		for (char i : arr) if (map.containsKey(i)) map.put(i, map.get(i) + 1); else map.put(i, 1);
		return map;
	}

	// Number of Divisor for Range [l, r]
	public static int[] NumberOFDivisors(int l, int r) {
		int[] arr = new int[l - r + 1];
		for(int i = l; i <= r; i++) for(int j = i; j <= r; j += i) arr[j]++;
		return arr;
	}

	public static int LowerBound(int a[], int x) { // x is the target value or key

		  int l = -1,r = a.length;
		  while(l + 1 < r) {
		    int m = (l + r) >>> 1;
		    if(a[m] >= x) r = m;
		    else l = m;

		  }
		  return r;
	}

	static boolean[] prime;
	public static void sieveOfEratosthenes(int n) {

        	prime = new boolean[n+1];
	        for(int i=0;i<n;i++)
	            prime[i] = true;
	        for(int p = 2; p*p <=n; p++) {
	            if(prime[p] == true) {
	                for(int i = p*p; i <= n; i += p)
	                    prime[i] = false;
	            }
	        }
    	}

	public static int UpperBound(long a[], long x) {// x is the key or target value

		    int l = -1,r = a.length;
		    while(l + 1 < r) {
		       int m = (l + r) >>> 1;
		       if(a[m] <= x) l = m;
		       else r = m;
		    }
		    return l + 1;
	}

    	public static long lcm(long a, long b) {
		return (a * b) / gcd(a, b);
	}

	public static long gcd(long a, long b) {
		if (a == 0)
			return b;
		return gcd(b % a, a);
	}

	public static void sort(int[] arr) {
		Random rand = new Random();
		int n = arr.length;
		for(int i = 0; i<n; i++) {
			swap(arr, i, rand.nextInt(n));
		}
		Arrays.sort(arr);
	}

	public static void swap(int[] arr, int i, int j) {
		if(i!=j) {
			arr[i] ^= arr[j];
			arr[j] ^= arr[i];
			arr[i] ^= arr[j];
		}
	}
     
	public static void sortbyColumn(int[][] arr, int col) {
		Arrays.sort(arr, new Comparator<int[]>() {
			public int compare(final int[] entry1, final int[] entry2) {
				if (entry1[col] > entry2[col])
					return 1;
				else
					return -1;
			}
		});
	}

	public static void ArraySort2D(double[][] arr, int xy) {
		// xy == 0, for sorting wrt X-Axis
		// xy == 1, for sorting wrt Y-Axis
		Arrays.sort(arr, Comparator.comparingDouble(o -> o[xy]));
	}
     
	static class FastScanner {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readIntArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		long[] readLongArray(int n) {
			long[] a=new long[n];
			for (int i=0; i<n; i++) a[i]=nextLong();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}
}