Your company is writing a word processor (like MS Word) and as part of the development team, you are expected to contribute.
However, due to your lack of any kind of proficiency in coding what so ever, the team has decided to let you handle the simplest part of the word processor -- the word counter.
Given a line of text, count the number of words which appear in that line.
Words consist of a block of alphanumeric characters separated by either punctuation or spaces.
ThisIsOneWord ---> 1 Word
These,Are Many.Words. ---> 4 Words
Input will consist of a line of less than 500 characters.
Output should consist of one number. The number of words in the input string.
Sample Input 1
This is a simple problem :)
Sample Output 1
Sample Input 2
Remember, numbers like 123 are words too.
Sample Output 2