#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    int ten = n + 1;
    int hundred = ten + 1;
    int thousand = hundred + 1;
    int ten_thousand = thousand + 1;
    int result = ten_thousand * 10000 + thousand * 1000 + hundred * 100 + ten * 10 + n;
    cout << result << endl;
    return 0;
}    
/**************************************************************
	Problem: 1621
	User: linmiaoling
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/