title: Leonardo Number 1
signature: leonardo_number_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          75L, 
          6832909245813413L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          76L, 
          11055879401769513L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          55L, 
          451702867433L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          14L, 
          1219L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          43L, 
          1402817465L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          10L, 
          177L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          16L, 
          3193L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          30L, 
          2692537L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          44L, 
          2269806339L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          65L, 
          55555780070575L
      )))
  
  }
  
  main()
source_py: def leonardo_number_1(n):
      dp = []
      dp.append(1)
      dp.append(1)
      for i in range(2, (n + 1)):
          dp.append(((dp[(i - 1)] + dp[(i - 2)]) + 1))
      return dp[n]
source_cpp: int leonardo_number_1(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = dp [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) dp [ i ] = dp [ i - 1 ] + dp [ i - 2 ] + 1;
    return dp [ n ];
  }