title: Leonardo Number 1
signature: function leonardoNumber1(n) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(n, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(75, 6832909245813413);
    console.log(`TEST-0...${result}`);
  
    result = driver(76, 11055879401769513);
    console.log(`TEST-1...${result}`);
  
    result = driver(55, 451702867433);
    console.log(`TEST-2...${result}`);
  
    result = driver(14, 1219);
    console.log(`TEST-3...${result}`);
  
    result = driver(43, 1402817465);
    console.log(`TEST-4...${result}`);
  
    result = driver(10, 177);
    console.log(`TEST-5...${result}`);
  
    result = driver(16, 3193);
    console.log(`TEST-6...${result}`);
  
    result = driver(30, 2692537);
    console.log(`TEST-7...${result}`);
  
    result = driver(44, 2269806339);
    console.log(`TEST-8...${result}`);
  
    result = driver(65, 55555780070575);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    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 ];
  }