Index array out of bound exception

I am getting this error when trying to add string to list in a loop.

@valli165 can u share ur xaml?

Thanks for the reply… I got solution for that… i was calling bigger number than existing number- thats why i got this error.- I need another help- could you please let me know how to add rounddown functionality to a calculation?

ex : rounddown(a/b-1)

@valli165 What does rounddown function will do?