Description
You are given two strings S and T, such that length of S is greater than the length of T.
Then a substring of S is defined as a sequence of characters which appear consecutively in S.

Find the total number of distinct substrings of M such that T is a substring of M

Input Format
One line containing strings S and T separated by a space.

Output Format
One line containing the number of distinct substrings of M such that T is a substring of M

Input Limits:
0 < Length(S), Length(T) < 100

SAMPLE INPUT
abcc c

SAMPLE OUTPUT
6

Explanation

Suppose  the  string  S  is  abcc.  Then  the  distinct  substrings  of  S  are
a, b, c, ab, bc, cc, abc, bcc, abcc
def get_unique_substrings(inputstr, uniqsubstrs):
    uniqsubstrs.add(inputstr)
    
    i,j = 0,0
    #u[j]=inputstr
    length = len(inputstr)
    while i < length:
        substr1 = inputstr[i:]
        j  = len(substr1)
        k = j
        while k >= 1:
            substr2 = substr1[:k]
            #print(substr2)
            if substr2 not in uniqsubstrs:
                uniqsubstrs.add(substr2)
                #j+=1
                #u[j]=substr2
                
            k -= 1
        i +=1
s1,s2=raw_input().split()        
allunique_substr = set(s1)
get_unique_substrings(s1, allunique_substr)
c=0
s=list(allunique_substr)
#print s
for i in range(len(s)):
	if s2 in s[i]:
		c+=1
		 
print c