title: Count Possible Ways To Construct Buildings
signature: function count_possible_ways_to_construct_buildings(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(17, 17480761);
      @printf("TEST-0...%s\n",result);
      
      result = driver(34, 222915410843904);
      @printf("TEST-1...%s\n",result);
      
      result = driver(9, 7921);
      @printf("TEST-2...%s\n",result);
      
  end
  
  main()
source_py: def count_possible_ways_to_construct_buildings(N):
      if (N == 1):
          return 4
      countB = 1
      countS = 1
      for i in range(2, (N + 1)):
          prev_countB = countB
          prev_countS = countS
          countS = (prev_countB + prev_countS)
          countB = prev_countS
      result = (countS + countB)
      return (result * result)
source_cpp: int count_possible_ways_to_construct_buildings(int N) {
    if ( N == 1 ) return 4;
    int countB = 1, countS = 1, prev_countB, prev_countS;
    for ( int i = 2;
    i <= N;
    i ++ ) {
      prev_countB = countB;
      prev_countS = countS;
      countS = prev_countB + prev_countS;
      countB = prev_countS;
    }
    int result = countS + countB;
    return ( result * result );
  }