Number Of Substrings Formula