Here is task. You have a pyramid that looks like that:

      1
    2   3
  4   5   6
3  10  2   3

You start at top, and travel down. You can only travel down and only do adjusted node. You have only 2 choices. For example, from node with value 1 you can move to node with value 2 or 3. From node with value 2 you can only move to node with value 4 or 5, but you cannot move to node with value 6 because it is too far. Also, you cannot move from node with value 3 to node with value 4.

Your task is to find path that provides biggest sum