I would suggest running this with a series of inputs. What happens when N is 10? 100? 1000? 100000? How many calculations do you perform each time? Graph those out, and it'll be pretty easy to...