ГлавнаяСборникиТурнирыРазделыФорумы ПечатьПомощьО системе

Разделы > Linear Data structures: Stacks, Queues, Linked Lists, etc > задача:


Q5

Задачи раздела

• 50777 - Dwarfs Maze
• 50781 - ReversesreveR
• 50780 - Hot Potato - Revisited
• 50564 - Kovat e qumeshtit te mamase
• 50636 - Скобки
• 50776 - Numri i rrugeve te ndryshm...
• 50779 - Rruga me e shkurter ne lab...
• Q3
• Q5

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 4000/7000/7000/7000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Сложность Гамма

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