Topological media are systems whose properties are protected by topology and thus are robust to deformations of the system. In topological insulators and superconductors the bulk-surface and bulk-vortex correspondence gives rise to the gapless Weyl, Dirac or Majorana fermions on the surface of the system and inside vortex cores. Here we show that in gapless topological media, the bulk-surface and bulk-vortex correspondence is more effective: it produces topologically protected gapless fermions without dispersion—the fiat band. Fermion zero modes forming the flat band are localized on the surface of topological media with protected nodal lines [A. P. Schnyder and S. Ryu, Phys. Rev. B 84, 060504(R) (2011); T. T. Heikkil G. E. Volovik, JETP Lett. 93, 59 (2011)] and in the vortex core in systems with topologically protected Fermi points (Weyl points) [G. E. Volovik, JETP Lett. 93, 66 (2011)]. Flat band has an extremely singular density of states, and we show that this property may give rise in particular to surface superconductivity which could exist even at room temperature.