Limits 1s, 512 MB

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.

Input

The only of the input will contain an integer NN and a string SS seperated by space consisting of lowercase latin letters whereNN is the length of string SS.

1N1031 \le N \le 10^3

Output

You have to output the maximum possible length of the palindrome.

Sample

InputOutput
5 abcba
5

Be careful about the newline(‘\n’) at the end.

Submit

Login to submit.

Statistics

76% Solution Ratio
Asif_AlimEarliest, 11M ago
Osru.3519Fastest, 0.0s
raka.1503Lightest, 4.9 MB
raka.1503Shortest, 351B
Toph uses cookies. By continuing you agree to our Cookie Policy.