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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
bool binary_search(int arr[], int x, int l, int n) {
  int mid = (x) + (l - x) / 2;
  if (x >= l) {
    return false;
  } else if (arr[mid] == n) {
    return true;
  } else if (arr[mid] < n) {
    x = mid;
    return binary_search(arr, x, l, n);
  } else if (arr[mid] > n) {
    l = mid;
    return binary_search(arr, x, l, n);
  }
  return false;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(int a, int b) { return (a / gcd(a, b)) * b; }
string IntToString(long long int a) {
  char x[100];
  sprintf(x, "%lld", a);
  string s = x;
  return s;
}
bool is_prime(long long int n) {
  if (n == 1) {
    return false;
  }
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
long long int SieveOfEratosthenes(int n) {
  long long int count = 0;
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long int i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long int p = 2; p <= n; p++) {
    if (prime[p]) {
      if (n % p == 0) count++;
    }
  }
  return count;
}
void solve() {
  string s;
  cin >> s;
  int max = 0;
  int t = s[s.length() - 1] - '0';
  int count = 0;
  int min = 100000000;
  for (int i = 0; i < s.length(); i++) {
    if (int(s[i] - '0') % 2 == 0) {
      count++;
      if ((s[i] - '0') > max) {
        max = s[i] - '0';
      }
      if ((s[i] - '0') < min) {
        min = s[i] - '0';
      }
    }
  }
  if (count == 0) {
    cout << -1 << endl;
    return;
  }
  if (max > t) {
    if (min < t) {
      for (int i = 0; i < s.length() - 1; i++) {
        if (t > (s[i] - '0') && ((s[i] - '0') % 2 == 0)) {
          s[s.length() - 1] = s[i];
          s[i] = t + '0';
          break;
        }
      }
    } else {
      for (int i = s.length() - 2; i >= 0; i--) {
        if (((s[i] - '0') % 2 == 0)) {
          s[s.length() - 1] = s[i];
          s[i] = t + '0';
          break;
        }
      }
    }
    cout << s << endl;
  } else {
    for (int i = 0; i < s.length() - 1; i++) {
      if ((s[i] - '0') % 2 == 0) {
        s[s.length() - 1] = s[i];
        s[i] = t + '0';
        break;
      }
    }
    cout << s << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}