Bubble sort doubt

hi,
In inner loop ,how we can derive the formula n-1-iteration.
thnks.