eolymp
bolt
Try our new interface for solving problems
Problems

Sum of squares of digits

Sum of squares of digits

Four-digit positive integer is given. Find the sum of squares of its digits.

Input

One four-digit positive integer n (1000n9999).

Output

Print the sum of squares of digits of number n.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1234
Output example #1
30