#K96077. Minimum Socks Problem
Minimum Socks Problem
Minimum Socks Problem
Alice has a drawer containing N pairs of socks. She wants to be sure that when she randomly draws socks from the drawer, she gets at least one matching pair (i.e. two socks from the same pair). According to the pigeonhole principle, no matter how the socks are arranged, if she picks out one more sock than the number of pairs, she is guaranteed to have a matching pair.
The problem is formulated mathematically as follows:
Given an integer \( N \) representing the number of pairs of socks, compute \( N+1 \). That is, output the minimum number of socks Alice must pull out to ensure she has at least one matching pair.
inputFormat
The input consists of a single integer N (\(0 \leq N \leq 10^5\)) representing the number of pairs of socks available in the drawer.
The input is provided via stdin.
outputFormat
Output a single integer which is the minimum number of socks Alice must draw to guarantee that she has at least one matching pair. This value is equal to N + 1.
The output should be printed to stdout.
## sample3
4