n^n mod 10^p#3742

n^n mod 10^p

1 second
64 megabytes
Medium

Given the integers and , compute n^n \bmod 10^p.

Input

You will be provided with two integers and (1 \leq n \leq 10^9, 1 \leq p \leq 100).

Output

Print a single integer representing n^n \bmod 10^p.

Examples

Example 1

Loading
Loading