include "primitives.alh"

Element numbers = ?

Integer function fib(param : Integer):
	Integer new
	while (param > list_len(numbers)):
		new = list_len(numbers)
		list_append(numbers, integer_addition(dict_read(numbers, new - 2), dict_read(numbers, new - 1)))
	return dict_read(numbers, param - 1)!

Void function main():
	numbers = create_node()
	list_append(numbers, 1)
	list_append(numbers, 1)
	while(True):
		output(fib(input()))
