eolymp
bolt
Try our new interface for solving problems
Problems

Memory

Memory

There are \textbf{N} memory modules, capable of working only in a pair. Some of them are in disrepair, some - not. By placing the two modules in the computer and running the test program, you can get one of two answers: \begin{itemize} \item Both modules operable; \item A module is defective (or both), but exactly which module is defective, is unknown. \end{itemize} After checking a pair of modules of the decision about which pair of modules will be checked next. Need to find a minimum number of inspections in the worst case, you must perform to determine which modules are functioning properly or to make sure that exactly define a set of modules can not be healthy. \InputFile The first line contains one integer \textbf{N} (\textbf{1} <= \textbf{N} <= \textbf{100}). \OutputFile Remove one of the required number.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
Output example #1
1
Author Igor Andrianov