Part of the challenge for kc021's codegolf, this is a naiive solution in my opinion, however it does get the job done, and the answer is put in the variable 's'
1 block reduced