The LINAC of the European Spallation Source will ac- celerate the proton beam to its final energy mainly by using superconducting structures. Choosing the right transition energy between these superconducting structures as well as choosing the cavity length and number of cells which en- hances the acceleration is of great importance. Two types of LINACs will be studied, a LINAC with superconducting quadrupoles and a LINAC with normal conducting, resis- tive, quadrupoles. The procedure to find the optimized LINAC will be described here.