#include<iostream> using namespace std; int main(){ int a,b,c,d,x; cin>>x; a = x%10; b = x%100/10; c = x%1000/100; d = x/1000; cout<<c*1000+d*100+a*10+b; return 0; }