Synthesis of 2-(1,5,3-dithiazepan-3-yl)ethanol and N,N'-bis(2-hydroxyethyl)tetrathiadiazacycloalkanes was performed by multicomponent condensation of monoethanolamine with formaldehyde and SH-acids (1,2-ethane, 1,3-propane-, 1,4-butane-, 1,5-pentane-, and 1,6-hexanedithiols). The resulting S,N-containing heterocycles and macrocycles possess fungicidal properties relative to microscopic fungi, plant pathogens.