#include <fstream>
#include <vector>

using namespace std;

ifstream input("DQND.inp");
ofstream output("DQND.out");

int Reverse(long long n, int count = 0)
{
	if (n != 0)
	{
		output << n % 10;
		count++;
		Reverse(n / 10, count);
	}
	else
	{
		output << '\n';
		return count;
	}
}

int main()
{
	long long n;
	input >> n;
	output << Reverse(n);
	input.close();
	output.close();
	return 0;
}