We propose a method for the design of a complex optical element for use in lithographic system. It is based on optimization of the intensity point spread function of the lithographic projector. Increase in the depth of focus up to +/- 3micrometers in comparison with unaltered pupil demonstrated. This is achieved without introducing significant undesirable proximity effects, and in such a way, control over the sidelobe level is achieved. The solution is universal, without any reference to the projection of the particular mask layout. The analytical representation of the filter allows for explicit optimization process. Practical realization of the filter based on statistical approach is presented. Limitations of the proposed approach are discussed.