Pergunta de entrevista da empresa Fortinet

Fibonacci-like problem and we need to calculate the output