title: Nth Non Fibonacci Number
signature: fun nthNonFibonacciNumber(n: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(76, 85)
      println("TEST-0...${result}")
      
      result = driver(91, 101)
      println("TEST-1...${result}")
      
      result = driver(62, 71)
      println("TEST-2...${result}")
      
      result = driver(65, 74)
      println("TEST-3...${result}")
      
      result = driver(83, 93)
      println("TEST-4...${result}")
      
      result = driver(57, 66)
      println("TEST-5...${result}")
      
      result = driver(76, 85)
      println("TEST-6...${result}")
      
      result = driver(6, 11)
      println("TEST-7...${result}")
      
      result = driver(2, 6)
      println("TEST-8...${result}")
      
      result = driver(86, 96)
      println("TEST-9...${result}")
      
          
  }
  
  main()
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;
  }