This page is still under construction.

Parts of this page are still being built. What you see may change.

The Suffering of 5

Interview

Time limit1sMemory limit1024 MB

Summary
Read a five-digit number and print the sum of the fifth powers of its five digits.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Kipa suddenly thought of 5, which never gets the spotlight because the solid walls of 3 and 4 block it. 'So many things in the world are related to 5!'

Kipa began to think of places where 5 is used. A person has 5 fingers, there are 5 regular polyhedra, the only known untouchable odd number is 5, stars are usually five-pointed, and above all, "five stars!"

Then Kipa suddenly felt a desire rising in his heart to raise things to the fifth power. For Kipa, write a program that takes a five-digit number as input and prints the sum of the fifth powers of its digits.

Input

The first line gives a positive integer nn with five digits. The given nn satisfies 104≤n<10510^{4} \leq n < 10^{\mathbf{5}}.

Output

Print the sum of the fifth powers of the digits on the first line.

Examples4

  1. Example 1

    Input
    12345
    
    Expected output
    4425
    
  2. Example 2

    Input
    54748
    
    Expected output
    54748
    
  3. Example 3

    Input
    92727
    
    Expected output
    92727
    
  4. Example 4

    Input
    93084
    
    Expected output
    93084