J.P. Morgan interview question

Fibonacci sequence and a DP problem