loop must be executed while A < N