Code

i = 40 - 3
for j in range(3, 12, 2):
    print(j)
    i = i + 1

print(i)

Output