def g(x): return (x + x) def f(x): if (x < 0): d = 0 if (x == 0): d = 1 else: d = g(f((x - 1))) return d