#include int main(){ int b, s, d, j; scanf("%d",&b); j=b%10; d=(b/10)%10; s=(b/100)%10; b=(b/1000)*1000+100*j+10*d+s; printf("%d\n",b); return 0; }