input: Write a function to debug the given Python code by correcting the issues in the functions `f1` and `f2` to ensure they work as intended. The output should be 9 when calling `f2(2)`.
  assert f2(2)==9
  assert f2(3)==16
  assert f2(0)==1
output: def f2(x):
      return (x + 1) ** 2