Counting Primitive Operators

Hey, I was just trying to figure out how to count the primitive operations on pseudo code here is the code :-

Algorithm 1. ArrayMax(Arr)

Input: A 1-D numerical array Arr of size n

1) Let CurrentMax = a0

2) For i = 1 to n-1

3) If ai > CurrentMax Then CurrentMax = ai

4) End For

Output: CurrentMax

From my understanding :-

Line 1: one read and one write = 2

Line 2: a total of n-1 writes (changing i from 1 to n-1) = n-1

I am stuck on calculating line 3 because its within the loop any help would be much apprechated, thanks.