def fibonacciAtIndex(index):
	"""
	Returns the fibonacci number at a given index.
	Algorithm is using 3 variables instead of recursion in order to reduce memory usage and runtime
	"""
	a1, a2 = 1,1
	position = 3
	# while position <= index:
	while index > 2:
		temp = a1
		a1 = a2
		a2 += temp
		# position += 1
		index -= 1
	return a2