Universal numbers#9005

Universal numbers

2 saniye
256 megabayt
Kolay

Ibrahim loves to play with numbers. He recently learned how to raise numbers to a power, and he really likes it. Farhad knows this, so he asked Ibrahim the following question: in how many different ways can one represent as the sum of three numbers with the same integer non-negative base raised to a non-negative integer.

In other words, you must find the number of different quadruples of non-negative integers (, , , ), satisfying the equality n = k^a + k^b + k^c (k > 0).

Help Ibrahim to solve this problem.

Giriş

One integer (4 \le n \le 10^{18}).

Çıktı

Print one integer - the number of different quadruples of numbers.

Örnekler

Örnek 1

Loading
Loading

Örnek 2

Loading
Loading

Örnek 3

Loading
Loading