#K76687. Shortest Word Length

    ID: 34698 Type: Default 1000ms 256MiB

Shortest Word Length

Shortest Word Length

Given a string containing words separated by spaces, your task is to determine the length of the shortest word. A word is defined as a sequence of non-space characters. For example, if the input is "The quick brown fox", the shortest word is "fox", whose length is 3.

You may assume that the input will contain at least one word.

If necessary, you can refer to the formula \(\min_{w \in S} |w|\), where \(S\) is the set of words in the string and \(|w|\) represents the length of the word.

inputFormat

The input consists of a single line containing the sentence. The words are separated by one or more spaces.

outputFormat

Output a single integer - the length of the shortest word in the input string.

## sample
The quick brown fox
3