Cut a string#7447

Cut a string

1 saniye
128 megabayt
Çok kolay

Given a string . You are allowed to choose any two identical adjacent characters and delete them from the string. This operation can be repeated as long as it is possible.

Before performing this operation, you may delete any number of characters from the string.

Determine the minimum number of characters that must be deleted beforehand so that afterwards, by applying the allowed operation, you can obtain an empty string.

Giriş

One string s~(1 \le |s| \le 100).

Çıktı

Print the minimum number of characters that must be deleted beforehand.

Örnekler

Örnek 1

Loading
Loading