Memory
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
There are 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:
Both modules operable;
A module is defective (or both), but exactly which module is defective, is unknown.
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.
Input
The first line contains one integer N (1 <= N <= 100).
Output
Remove one of the required number.
Examples
Input #1
Answer #1
Submissions 249
Acceptance rate 24%