Pregunta de entrevista de Finastra

Disguised Fibonacci problem to solve/write an algorithm for.