To derive the explicit form of the V P4 L term, representing additional terms in the firstorder exchange energy proportional to the fourth power of overlap integrals S, an automatic generator of symbolic expressions for Symmetry-Adapted Perturbation Theory was used. An automatically generated expression for the V P4 L term, assuming a Restricted Hartree-Fock (RHF) function as the reference state, takes form