this is a function that returns the needed amount of messages [with max length of K] to send the text [S]
- K is an integer within the range [1..500];
- S is a non-empty string containing at most 500 characters: only letters and spaces, there are no spaces at the beginning and at the end of S; also there can't be two or more consecutive spaces in S;
- if it's impossible to split text into proper SMS messages, function returns −1;