title: Nth Non Fibonacci Number
signature: nthNonFibonacciNumber(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          76, 
          85)
      }");
  
      print("TEST-1...${driver(
          91, 
          101)
      }");
  
      print("TEST-2...${driver(
          62, 
          71)
      }");
  
      print("TEST-3...${driver(
          65, 
          74)
      }");
  
      print("TEST-4...${driver(
          83, 
          93)
      }");
  
      print("TEST-5...${driver(
          57, 
          66)
      }");
  
      print("TEST-6...${driver(
          76, 
          85)
      }");
  
      print("TEST-7...${driver(
          6, 
          11)
      }");
  
      print("TEST-8...${driver(
          2, 
          6)
      }");
  
      print("TEST-9...${driver(
          86, 
          96)
      }");
  
      return 0;
  }
source_py: def nth_non_fibonacci_number(n):
      prevPrev = 1
      prev = 2
      curr = 3
      while (n > 0):
          prevPrev = prev
          prev = curr
          curr = (prevPrev + prev)
          n = (n - ((curr - prev) - 1))
      n = (n + ((curr - prev) - 1))
      return (prev + n)
source_cpp: int nth_non_fibonacci_number(int n) {
    int prevPrev = 1, prev = 2, curr = 3;
    while ( n > 0 ) {
      prevPrev = prev;
      prev = curr;
      curr = prevPrev + prev;
      n = n - ( curr - prev - 1 );
    }
    n = n + ( curr - prev - 1 );
    return prev + n;
  }