output_description: Print the minimum possible total cost incurred.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      h_1 h_2 \ldots h_N
attempt: def min_cost_frog_jump(stone_values, i, n):
      # Base Case
      if i + 1 == n:
          t[i + 1] = 0
          return t[i + 1]
      if i + 2 == n:
          t[i + 2] = abs(stone_values[i + 1] - stone_values[i])
          return t[i + 2]
      if t[i] != -1:
          return t[i]
  
      jump_to_one = abs(stone_values[i + 1] - stone_values[i]) + min_cost_frog_jump(
          stone_values, i + 1, n
      )
      jumpy_to_two = abs(stone_values[i + 2] - stone_values[i]) + min_cost_frog_jump(
          stone_values, i + 2, n
      )
      t[i] = min(jump_to_one, jumpy_to_two)
      return t[i]
  
  
  num_of_stones = int(input())
  stone_values = [int(it) for it in input().split(" ")]
  
  t = [-1] * (num_of_stones + 1)
  print(min_cost_frog_jump(stone_values=stone_values, i=0, n=num_of_stones))
  
problem_description: Statement
  
  There are N stones, numbered 1, 2, \ldots, N. For each i (1 \leq i \leq N),
  the height of Stone i is h_i.
  
  There is a frog who is initially on Stone 1. He will repeat the following
  action some number of times to reach Stone N:
  
    * If the frog is currently on Stone i, jump to Stone i + 1 or Stone i + 2. Here, a cost of |h_i - h_j| is incurred, where j is the stone to land on.
  
  Find the minimum possible total cost incurred before the frog reaches Stone N.
samples: [{"input": "4\n    10 30 40 20", "output": "30\n    \n\nIf we follow the path 1 \u2192 2 \u2192 4, the total cost incurred would be |10 - 30| +\n|30 - 20| = 30.\n\n* * *"}, {"input": "2\n    10 10", "output": "0\n    \n\nIf we follow the path 1 \u2192 2, the total cost incurred would be |10 - 10| = 0.\n\n* * *"}, {"input": "6\n    30 10 60 10 60 50", "output": "40\n    \n\nIf we follow the path 1 \u2192 3 \u2192 5 \u2192 6, the total cost incurred would be |30 -\n60| + |60 - 60| + |60 - 50| = 40."}]