title: A puzzle related to nested loops
body: <p>For a given input N, how many times does the enclosed statement executes?</p>
  
  <pre><code>for i in 1 … N loop
    for j in 1 … i loop
      for k in 1 … j loop
        sum = sum + i ;
      end loop;
    end loop;
  end loop;
  </code></pre>
  
  <p>Can anyone figure out an easy way or a formula to do this in general. Please explain.</p>