```python
total = 0 # 1 op (assignment)
i = 0 # 1 op (assignment)
while i < n: # 1 op per check: n passing checks + 1 final failed check
product = i * 3 # 2 ops (multiplication, assignment)
total = total + product # 2 ops (addition, assignment)
i = i + 1 # 2 ops (addition, assignment)
```