#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main ()
{
string s;
cin >> s;
int i, j, k, l, x, y;
int sz = s.size();
s[0]=s[0]--;
if (s[0]=='0')
{
cout << 1;
for (i=1; i<sz; i++)
{
cout << s[i];
}
for (i=sz-1; i>=1; i--)
{
cout << s[i];
}
cout << 1;
}
else
{
for (i=0; i<sz; i++)
{
cout << s[i];
}
for (i=sz-1; i>=0; i--)
{
cout << s[i];
}
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKIAppbnQgbWFpbiAoKQp7CiAgICBzdHJpbmcgczsKICAgIGNpbiA+PiBzOwogICAgaW50IGksIGosIGssIGwsIHgsIHk7CiAgICBpbnQgc3ogPSBzLnNpemUoKTsKICAgIHNbMF09c1swXS0tOwogICAgaWYgKHNbMF09PScwJykKICAgIHsKICAgICAgICBjb3V0IDw8IDE7CiAgICAgICAgZm9yIChpPTE7IGk8c3o7IGkrKykKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQgPDwgc1tpXTsKICAgICAgICB9CiAgICAgICAgZm9yIChpPXN6LTE7IGk+PTE7IGktLSkKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQgPDwgc1tpXTsKICAgICAgICB9CiAgICAgICAgY291dCA8PCAxOwogICAgfQogICAgZWxzZQogICAgewogICAgICAgIGZvciAoaT0wOyBpPHN6OyBpKyspCiAgICAgICAgewogICAgICAgICAgICBjb3V0IDw8IHNbaV07CiAgICAgICAgfQogICAgICAgIGZvciAoaT1zei0xOyBpPj0wOyBpLS0pCiAgICAgICAgewogICAgICAgICAgICBjb3V0IDw8IHNbaV07CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDA7Cn0=