#include <stdio.h>
#include <math.h>
long fun(long s)
{
long n = 0, t1;
long t = 0;
while (s)
{
s /= 10;
t1 = s % 10;
s /= 10;
t += t1 * pow(10, n);
n++;
}
return t;
}
int main(void)
{
long s;
scanf("%ld", &s);
printf("%ld", fun(s));
}