HomeVolumesContestsSectionsForums PrintHelpAbout

Sections > Linear Data structures: Stacks, Queues, Linked Lists, etc > problem:


Q5

Section problems

• 50564 - Mother's Milk Buckets
• 50636 - Brackets
• 50776 - The number of different pa...
• 50779 - The shortest path in a maze
• Q3
• Q0
• 50775 - Balanced Parenthesis
• 50774 - Hot Potato
• Q5

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb. Difficulty Gamma

A string is called palindrome if it is symmetric, i.e. if it is written the same from right to left and from left to right. Write a program that finds the minimum number of characters that must be added to the string to make the string a palindrome.

Input

Given a string, not exceeding 8 characters.

Output

Show the minimal number of characters that must be added to the string so that it becomes a palindrome.



Input I

Ab3bd

Output 1

2


Для отправки решений необходимо выполнить вход.

www.contester.ru