import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int s = (n + 1) * 10;
int b = (n + 2) * 100;
int q = (n + 3) * 1000;
int w = (n + 4) * 10000;
int sum = n + s + b + q + w;
System.out.println(sum);
}
}
/**************************************************************
Problem: 1621
User: admin
Language: Java
Result: Accepted
Time:662 ms
Memory:40316 kb
****************************************************************/