\begin{problem}{${problem.name}}<#-- -->{<#if "stdin" == problem.inputFile><#-- --><#if "russian" == language>стандартный ввод<#-- --><#else>standard input<#-- --><#else>${problem.inputFile}}<#-- -->{<#if "stdout" == problem.outputFile><#-- --><#if "russian" == language>стандартный вывод<#-- --><#else>standard output<#-- --><#else>${problem.outputFile}}<#-- --><#assign timeLimit=problem.timeLimit/1000/><#-- --><#if language="russian"><#-- --><#if problem.timeLimit%1000!=0||(10<=timeLimit%100&&timeLimit%100<20)||timeLimit%10=0||5<=timeLimit><#-- -->{${timeLimit?c} секунд}<#-- --><#else><#-- --><#if timeLimit%10=1><#-- -->{${timeLimit?c} секунда}<#-- --><#else><#-- -->{${timeLimit?c} секунды}<#-- --><#-- --><#-- --><#else><#-- -->{${timeLimit?c} second<#if (timeLimit!=1)>s}<#-- --><#-- --><#assign memoryLimit=problem.memoryLimit/1048576/><#-- --><#if language="russian"><#-- --><#if problem.memoryLimit%1048576==0&&!(10<=memoryLimit%100&&memoryLimit%100<20)&&2<=memoryLimit%10&&memoryLimit%10<5><#-- -->{${memoryLimit?c} мегабайта} <#else><#-- -->{${memoryLimit?c} мегабайт} <#else><#-- -->{${memoryLimit?c} megabyte<#if (memoryLimit>1)>s} <#if providedStatementsCommands?? && providedStatementsCommands?size != 0><#-- --><#list providedStatementsCommands as command><#-- -->${command?string} ${problem.legend} <#if problem.input?? && (problem.input?length>0)> \InputFile ${problem.input} <#if problem.output?? && (problem.output?length>0)> \OutputFile ${problem.output} <#if problem.interaction?? && (problem.interaction?length>0)> \Interaction ${problem.interaction} <#if problem.scoring?? && (problem.scoring?length>0)> \Scoring ${problem.scoring} <#if (problem.sampleTests?size>0)> \Example<#if (problem.sampleTests?size>1)>s \begin{example} <#list problem.sampleTests as test> \exmpfile{${test.inputFile}}{${test.outputFile}}% \end{example} <#if (problem.notes??) && (problem.notes?length > 0)> \Note ${problem.notes} \end{problem}