#include <bits/stdc++.h>
using namespace std;
int main ()
{
	freopen ("DQND.inp", "r", stdin);
	freopen ("DQND.out", "w", stdout);
	string a;
	cin>>a;
	for (int i=a.length()-1; i>=0; i--)
	cout << a[i];
	cout << endl<< a.length();
}
