HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Albanian National Olympiads in Informatics > problem:


2012-3. 50721 - Palindrome

Guest
• Discussion of problem (2)

Volume problems

• 2013-3. 50570 - Prime numbers in t...
• 2013-4. 50958 - ATM
• 2013-5. 50543 - Hotel rooms
• 2013-6. 50562 - List of students
• 2012-1. 50544 - Stock market
• 2012-4. 50680 - Triangle
• 2012-5. 50551 - Camelot
• 2014-2. 50738 - Median value
• 2012-3. 50721 - Palindrome

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.
Olympiad 2012. Prepared by: Evis Hoxha. 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