#0005B6

O-lucky numbers

Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.


Find sum of digits for all N-digit numbers.


InputFrom first and only line of input read integer N, (N <= 10000) number of digits.

OutputIn first and only line of output, write solution. Sum Of digits for all n-digit numbers.

NOTICE:
20% : N<10
40% : N<20
60% : N<100
80% : N<1000


Input:

1

Output:

11


Input:

3

Output:

132


EXPLANATION: First example 4+7 =11
Second example: 3-digit lucky numbers are: 444,447,474,477,744,747,774,777.
Solution is: 12+15+15+18+15+18+18+21=132

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.