#include <bits/stdc++.h>

using namespace std;
int main() {
	ifstream f1("DQPS.INP");
	ofstream f2("DQPS.OUT");
	string s;
	int i;
	cin>>s;
	for(i=s.size()-1;i>=0;i--)
	{ cout<<s[i];
	}
	cout<<endl<<s.size();
	return 0;
}

