#include <iostream>
using namespace std;
const int TEN = 10;
int main() {
int n;
cin >> n;
int no_n = n;// Adunam numărul de cifre
int num_digits = 0;
while (no_n > 0) {
no_n /= TEN;
num_digits++;
}
int second_digit_pos = 1;// Calculăm a doua cifră de la stânga
int i = 0;
while (i < num_digits - 2) {
second_digit_pos *= TEN;
i++;
}
int second_digit = (n / second_digit_pos) % TEN;
int penultimate_digit_pos = TEN;// Calculăm penultima cifră
int penultimate_digit = (n / penultimate_digit_pos) % TEN;
n -= second_digit * second_digit_pos;// Înlăturăm a doua cifră de la stânga
n -= penultimate_digit * penultimate_digit_pos;// Înlăturăm penultima cifră
n += penultimate_digit * second_digit_pos;// Adăugăm penultima cifră în locul celei de-a doua cifre
n += second_digit * penultimate_digit_pos;// Adăugăm a doua cifră în locul penultimei cifre
cout << n << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IFRFTiA9IDEwOwoKaW50IG1haW4oKSB7CiAgICBpbnQgbjsKICAgIGNpbiA+PiBuOwogICAgaW50IG5vX24gPSBuOy8vIEFkdW5hbSBudW3Eg3J1bCBkZSBjaWZyZQogICAgaW50IG51bV9kaWdpdHMgPSAwOwogICAgd2hpbGUgKG5vX24gPiAwKSB7CiAgICAgICAgbm9fbiAvPSBURU47CiAgICAgICAgbnVtX2RpZ2l0cysrOwogICAgfQogICAgaW50IHNlY29uZF9kaWdpdF9wb3MgPSAxOy8vIENhbGN1bMSDbSBhIGRvdWEgY2lmcsSDIGRlIGxhIHN0w6JuZ2EKICAgIGludCBpID0gMDsKICAgIHdoaWxlIChpIDwgbnVtX2RpZ2l0cyAtIDIpIHsKICAgICAgICBzZWNvbmRfZGlnaXRfcG9zICo9IFRFTjsKICAgICAgICBpKys7CiAgICB9CiAgICBpbnQgc2Vjb25kX2RpZ2l0ID0gKG4gLyBzZWNvbmRfZGlnaXRfcG9zKSAlIFRFTjsKICAgIGludCBwZW51bHRpbW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