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

using namespace std;

int main() {

	string a;
	while (cin >> a) {
		int k[10] = {0};
		for (int i = 0; i < a.size(); i ++) {
			k[i] = a[i] - '0';
		}

		for (int i = 0; i < a.size(); i++) {
			k[i] = k[i] * 2;
			if (k[i] >= 10 && i != 0) {
				k[i-1] += k[i] / 10;
				k[i] = k[i] % 10;
			}
		}

		if (a.size() != 1) {
			for (int i = 0; i < a.size()-1; i++) {
				cout << k[i];
			}
		} else {
			cout << k[0] / 10;
		}

		cout << endl;
	}

	return 0;
}