solve fibonacci sequence problem