Again, you can calculate this directly without for loop.