#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char str[20];

    cout<<"input string(20):";
    cin>>str;

    cout<<strlen(str)<<endl;
    for(int i = 0;i<strlen(str);i++)
        cout<<str[strlen(str)-(i+1)];

    cout<<"\n";
    return 0;
}