Slightly smarter n parameter.