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 a2oj {

    static FastReader sc;
    static PrintWriter out;

    public static void main(String[] args) {
        sc = new FastReader();
        out = new PrintWriter(System.out);
        solve(sc, out);
        out.flush();
        out.close();
    }

    static void solve(FastReader sc, PrintWriter out) {
        // int t = sc.nextInt();
        // StringBuffer ans = new StringBuffer("");
        // while(t-- > 0) {

        // }
        // out.println(ans);
        String s = sc.nextLine();
        int n = s.length();
        int max = Character.getNumericValue(s.charAt(n - 1)), ind = -1;
        for (int i = 0; i < s.length() - 1; i++) {
            if (Character.getNumericValue(s.charAt(i)) % 2 == 0) {
                ind = i;
                if (Character.getNumericValue(s.charAt(i)) < max) {
                    break;
                }
            }
        }
        char[] ch = s.toCharArray();
        if (ind == -1) {
            out.println(ind);
        } else {
            char temp = ch[ind];
            ch[ind] = ch[n - 1];
            ch[n - 1] = temp;
            for (char e : ch)
                out.print(e);
        }
    }

    static void sieve(boolean[] prime, int n) {
        for (int i = 1; i <= n; i++) {
            prime[i] = true;
        }
        for (int i = 2; i * i <= n; i++) {
            if (prime[i] == true) {
                for (int j = 2; i * j <= n; j++) {
                    prime[i * j] = false;
                }
            }
        }
    }

    static void fillGraph(ArrayList<ArrayList<Integer>> adj, FastReader sc) {
        int n = sc.nextInt(), m = sc.nextInt();
        for (int i = 0; i < n + 1; i++) {
            adj.add(new ArrayList<Integer>());
        }
        for (int i = 1; i <= m; i++) {
            int x = sc.nextInt(), y = sc.nextInt();
            adj.get(x).add(y);
            adj.get(y).add(x);
        }
    }

    static void printGraph(ArrayList<ArrayList<Integer>> adj, PrintWriter out) {
        for (int i = 1; i < adj.size(); i++) {
            out.print(i + "->");
            for (int e : adj.get(i)) {
                out.print(e + " ");
            }
            out.println();
        }
    }

    static long minCost(int[] h, int i, int n, long[] dp, int k) {
        if (i == n - 1) {
            return 0;
        }
        if (i >= n)
            return Integer.MAX_VALUE;
        if (dp[i] != -1)
            return dp[i];
        long c2 = Integer.MAX_VALUE;
        for (int j = 1; j <= k; j++) {
            if (i + j < n) {
                c2 = Math.min(c2, Math.abs(h[i] - h[i + j]) + minCost(h, i + j, n, dp, k));
            }
        }
        return dp[i] = c2;
    }

    static int fib(int n) { // nth Fibonacci number in O(1) time.
        double phi = (1 + Math.sqrt(5)) / 2;
        return (int) Math.round(Math.pow(phi, n) / Math.sqrt(5));
    }

    static long nCr(long n, long r) { // Combinations
        if (n < r)
            return 0;
        if (r > n - r) { // because nCr(n, r) == nCr(n, n - r)
            r = n - r;
        }
        long ans = 1L;
        for (int i = 1; i <= r; i++) {
            ans *= n - r + i;
            ans /= i;
        }
        return ans;
    }

    static class Pair implements Comparable<Pair> { // Pair Class
        long x;
        long y;

        Pair(long x, long y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair o) {
            return (int) (this.x - o.x);
        }
    }

    static class Trip<E, T, Z> { // Triplet Class
        E x;
        T y;
        Z z;

        Trip(E x, T y, Z z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        public boolean equals(Trip<E, T, Z> o) {
            if (o instanceof Trip) {
                Trip<E, T, Z> t = o;
                return t.x == x && t.y == y && t.z == z;
            }
            return false;
        }

        public int hashCode() {
            return Integer.valueOf((int) x).hashCode() * 62 + Integer.valueOf((int) y).hashCode() * 31
                    + Integer.valueOf((int) z).hashCode();
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}