def f(x):
	y=(x+2)*(x-1)
	y=4*y
	y=y+8
	y=y/(x+1)
	return y