One day Vasya was lying in bed watching his electronic clock to fall asleep quicker.

Vasya lives in a strange country, where days have *h* hours, and every hour has *m* minutes. Clock shows time in decimal number system, in format H:M, where the string H always has a fixed length equal to the number of digits in the decimal representation of number *h* - 1. To achieve this, leading zeros are added if necessary. The string M has a similar format, and its length is always equal to the number of digits in the decimal representation of number *m* - 1. For example, if *h* = 17, *m* = 1000, then time equal to 13 hours and 75 minutes will be displayed as "13:075".

Vasya had been watching the clock from *h*<sub class="lower-index">1</sub> hours *m*<sub class="lower-index">1</sub> minutes to *h*<sub class="lower-index">2</sub> hours *m*<sub class="lower-index">2</sub> minutes inclusive, and then he fell asleep. Now he asks you to count how many times he saw the moment at which at least *k* digits changed on the clock simultaneously.

For example, when switching 04:19  →  04:20 two digits change. When switching 23:59  →  00:00, four digits change.

Consider that Vasya has been watching the clock for strictly less than one day. Note that the last time Vasya saw on the clock before falling asleep was "h2:m2". That is, Vasya didn't see the moment at which time "h2:m2" switched to the next value.
The first line of the input file contains three space-separated integers *h*, *m* and *k* (2 ≤ *h*, *m* ≤ 10<sup class="upper-index">9</sup>, 1 ≤ *k* ≤ 20). The second line contains space-separated integers *h*<sub class="lower-index">1</sub>, *m*<sub class="lower-index">1</sub> (0 ≤ *h*<sub class="lower-index">1</sub> &lt; *h*, 0 ≤ *m*<sub class="lower-index">1</sub> &lt; *m*). The third line contains space-separated integers *h*<sub class="lower-index">2</sub>, *m*<sub class="lower-index">2</sub> (0 ≤ *h*<sub class="lower-index">2</sub> &lt; *h*, 0 ≤ *m*<sub class="lower-index">2</sub> &lt; *m*).
print("_RANDOM_GUESS_1689437353.0209816")# 1689437353.021002