Consider the number of the form a^{a^{a^{\ldots}}} where is a positive integer that can appear in the notation twice or more, ^ is power operation. Let us call such numbers numbairs (which stands for number + stairs). For instance 27 = 3^3 and 16 = 2^{2^2} are numbairs. Number is a numbair too since 1 = 1^1. Numbers , , are not numbairs because they cannot be represented in the required form. Find out how many numbairs there are between and inclusive.
One integer (1 \leq n \leq 10^9).
Print the number of numbairs not exceeding .
Example 1