#include<bits/stdc++.h>
using namespace std;

int main(){
	int n,a,b,c;
	cin>>n;
	a=n%10*100;
	b=n/10%10*10;
	c=n/100%10*1;
	cout<<a+b+c+n;
	
	
	return 0;
}

/**************************************************************
	Problem: 1020
	User: linzihang
	Language: C++
	Result: Accepted
	Time:9 ms
	Memory:2072 kb
****************************************************************/