The net flux of the electric field through the surface is :
The electric flux through the surface S as due to all the charges as shown in following figure isq1+q3−q2−q4ϵ0