Alphabet
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
A string of lowercase letters is called alphabetical if deleting zero or more of its letters can result in the alphabet string "abcdefghijklmnopqrstuvwxyz".
Given a string s, determine the minimum number of letters to insert anywhere in the string to make it alphabetical.
Input
Contains a string s (1 ≤ |s| ≤ 50). It is guaranteed that s consists of lowercase ASCII letters a to z only.
Output
Print the minimum number of letters that must be inserted in order to make the string s alphabetical.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 215
Acceptance rate 43%