#K55162. Ada’s Winning Strategy
Ada’s Winning Strategy
Ada’s Winning Strategy
Ada is playing an unusual game where her winning strategy depends solely on the length of a given string. Given an integer l and a string s of length l (which may not necessarily affect the result), determine the number of ways Ada can always win. It turns out that her winning moves correspond exactly to the number of odd numbers in the range from 1 to l. Formally, the answer can be computed using the formula:
For example, if l is 5, then the answer is 3 because the odd numbers in the sequence [1, 2, 3, 4, 5] are 1, 3, and 5. Your task is to compute this number.
inputFormat
The input is given via standard input (stdin) and consists of two lines:
- The first line contains a single integer l, representing the length of the string.
- The second line contains a string s of length l composed of lowercase alphabetical characters.
outputFormat
Output via standard output (stdout) a single integer which is the number of winning moves for Ada, computed as $$\left\lfloor \frac{l+1}{2} \right\rfloor$$.
## sample5
ababa
3
</p>