Nomir and Upid have been participating in programming contests since their high-school days. They are now students of the Department of CSE at Daffodil International University, and this is their first time participating in the “TAKE-OFF” programming contest. One day after some practice, they went for a walk. After walk, they found a string consisting of only lowercase English letters on a piece of paper lying on the ground. Suddenly they thought, “If we can rearrange and erase the characters in the string, what is the longest string we can create, which is a palindrome.”
As they are not good in the string, and you are their best friend, they wanted your help to answer this question.
A palindrome is a string that reads the same backwards as forwards. For example, the string “abcba” is palindrome, while the string “abca” is not.
The only of the input will contain an integer and a string seperated by space consisting of lowercase latin letters where is the length of string .
You have to output the maximum possible length of the palindrome.
Input | Output |
---|---|
5 abcba | 5 |
Be careful about the newline(‘\n’) at the end.