Calculate the Super-Logarithm This should be a simple challenge.
Given a number \$n \ge 0\$, output the super-logarithm (or the \$\log^*\$, log-star, or iterated logarithm, which are equivalent since \$n\$ is never negative for this challenge.) of \$n\$.
$$\log^*(n) = \begin{cases}
0  &amp; \text{ if } n \le 1 \\
1 + \log^*(\log(n)) &amp; \text{ if } n &gt; 1
\end{cases}$$
This is one of the two inverse functions to tetration. The other is the super-root, which is in a related question.
Examples
Input       Output
0           0
1           0
2           1
3           2
4           2
...
15          2
16          3
...
3814279     3
3814280     4

Rules

You do not need to support decimals, though you may.
You need to support input of at least \$3814280 =  \left\lceil e^{e^e} \right\rceil\$.
You may not hard-code the values like 3814280. (Your program must theoretically support higher numbers.) I want an algorithm to be implemented.
Shortest code wins.

Related OEIS
Jelly, 8 bytes

ÆlÐĿĊḊi1


Try it online! or verify all test cases.

Background

We start by successively taking natural logarithms of the input and the subsequent results until the result no longer changes. This works because the extension of the natural logarithm to the complex plane has a fixed point; if z = e-W(-1) &approx; 0.318 + 1.337i &ndash; where W denotes the Lambert W function &ndash; we have log(z) = z.

For input n, after computing [n, log(n), log(log(n)), &hellip;, z], we first apply the ceiling function to each of the results. Jelly's implementation (Ċ) actually computes the imaginary part of complex number instead&dagger;, but we're not interested in these anyway.

Once the kth application of log yields a value less than or equal to 1, Ċ will return 1 for the first time. The 0-based index of that first 1 is the desired result.

The straightforward implementation (compute 1-based index, decrement) fails because of edge case 0, which does not have a 1 in its list of logarithms. In fact, for input 0, the sequence of logarithms is

[0, None]


This is because Jelly's logarithm (Æl) is overloaded; it first tries math.log (real logarithm), then cmath.log (complex logarithm), and finally "gives up" and returns None. Fortunately, Ċ is similarly overloaded and simply returns it argument if it cannot round up or take an imaginary part.

Likewise, input 1 returns

[1, 0, None]


which may create problems in other approaches that do or do not involve Ċ.

One way to fix this problem is apply Ḋ (dequeue; removes first element) to the array of logarithms. This maps

0ÆlÐĿ -&gt; [0, None]    -&gt; [None]
1ÆlÐĿ -&gt; [1, 0, None] -&gt; [0, None]


so neither list has a 1 now. This way, finding the index of the first 1 will return 0 (not found), which is the desired output for inputs 0 and 1.

How it works

ÆlÐĿĊḊi1  Main link. Argument: n (non-negative integer)

  ÐĿ      Apply the following link until the results are no longer unique.
Æl          Natural logarithm.
          Return the array of all unique results.
    Ċ     Round all resulting real numbers up to the nearest integer. This takes
          the imaginary part of complex numbers and does nothing for non-numbers.
     Ḋ    Dequeue; remove the first item (n) of the array of results.
      i1  Find the first index of 1 (0 if not found).




&dagger; This is one of the only three atoms in Jelly that are overloaded in a non-obvious manner.