Long ago, when Petya was a schoolboy, he was very much interested in the Petr# language grammar. During one lesson Petya got interested in the following question: how many different continuous substrings starting with the *s*<sub class="lower-index">*begin*</sub> and ending with the *s*<sub class="lower-index">*end*</sub> (it is possible *s*<sub class="lower-index">*begin*</sub> = *s*<sub class="lower-index">*end*</sub>), the given string *t* has. Substrings are different if and only if their contents aren't equal, their positions of occurence don't matter. Petya wasn't quite good at math, that's why he couldn't count this number. Help him!
The input file consists of three lines. The first line contains string *t*. The second and the third lines contain the *s*<sub class="lower-index">*begin*</sub> and *s*<sub class="lower-index">*end*</sub> identificators, correspondingly. All three lines are non-empty strings consisting of lowercase Latin letters. The length of each string doesn't exceed 2000 characters.
round
ro
ou
1
codeforces
code
forca
0
abababab
a
b
4
aba
ab
ba
1
abcdefghijklmnopqrstuvwxyz
abc
xyz
1
aaaaaaaaaaaaaaa
a
a
15
aaaaaaaaa
aa
aaa
7
rmf
rm
f
1
kennyhorror
kenny
horror
1
itsjustatest
just
its
0
ololo
trololo
ololo
0
ololololololololololololololo
o
l
14
includecstdiointmainputshelloworldreturn
cs
rn
1
imabadsanta
imabadsantaverybad
imabadsantaverybad
0
codecppforfood
c
d
3
jelutarnumeratian
jelu
erathian
0
yrbqsdlzrjprklpcaahhhfpkaohwwavwcsookezigzufcfvkmawptgdcdzkprxazchdaquvizhtmsfdpyrsjqtvjepssrqqhzsjpjfvihgojqfgbeudgmgjrgeqykytuswbahfw
jqfgbeudgmgjr
ojqfgbeudgmg
0
iifgcaijaakafhkbdgcciiiaihdfgdaejhjdkakljkdekcjilcjfdfhlkgfieaaiabafhleajihlegdkddifghbdbeiigiecbcblakliihcfdgkagfeadlgljijkecajbgekcekkkbflellchieehjkfcchjchigcjjaeclillialjdldiafjajdegcblcljkhfeeefeagbiilabhfjbcbkcailcaalceeekefehiadikjlkalgcghlkjegfeagfeafhibhecdlggehhecliidkghgbfbhfjldegfbifafdidecejlj
jbgekcekkkbflellchieehjkfcchjchigcjjaeclillialjdldiafjajdegcblcljkhfeeefe
abhfjbcbkcailcaalceeekefehiadikjlkalgcghlkjegfeagfeafhibhecdlggehhecliidkghgbfbhfjldegfb
1
bgphoaomnjcjhgkgbflfclbjmkbfonpbmkdomjmkahaoclcbijdjlllnpfkbilgiiidbabgojbbfmliemhicaanadbaahagmfdldbbklelkihlcbkhchlikhefeeafbhkabfdlhnnjnlimbhneafcfeapcbeifgcnaijdnkjpikedmdbhahhgcijddfmamdiaapaeimdhfblpkedamifbbdndmmljmdcffcpmanndeeclnpnkdoieiahchdnkdmfnbocnimclgckdcbp
pcbeifgcnaijdnkjpikedmdbhahhgcijddfmamdiaapaeimdhfblpkedamifbbdndmmljmd
bklelkihlcbkhchlikhefeeafbhkabfdlhnnjnlimbhneafcfeapcbeifgcnaijdnkjpikedmdbhahhgcijddfmamdiaapaeimdhfblpkedamifbbdndmmljmdcffcpmanndeeclnpnkdoieiahchdnk
0
fcgbeabagggfdbacgcaagfbdddefdbcfccfacfffebdgececdabfceadecbgdgdbdadcgfbbaaabcccdefabdfefadfdccbbefbfgcfdadeggggbdadfeadafbaccefdfcbbbadgegbbbcebfbdcfaabddeafbedagbgfdagcccafbddcfafdfaafgefcdceaabggfbaebeaccdfbeeegfdddgfdaagcbdddggcaceadgbddcbdcfddbcddfaebdgcebcbgcacgdeabffbedfabacbadcfgbdfffgadacabegecgdccbcbbaecdabeee
gd
aa
12
bcacddaaccadcddcabdcddbabdbcccacdbcbababadbcaabbaddbbaaddadcbbcbccdcaddabbdbdcbacaccccadc
c
db
68
uzxomgizlatyauzgyluecowouypbzladmwvtskagnltgjswsgsjmnjuxsokapatfevwavgxyhtokoaduvkszkybtqntsbaromqptomphrvvsyqchtydgslzsopervrhozsbiuygipfbmuhiaitrqqwdisxilnbuvfrqcnymaqxgiwnjfcvkqcpbiuoiricmuiyr
sjmn
mqpt
1
dbccdbcdbcccccdaddccadabddabdaaadadcdaacacddcccacbaaaabaa
dcc
cdbcc
0
abcdefg
abcde
cdefg
1
aaaaaaaaaaaaaaaaaaaaa
b
c
0
bcaaa
bca
c
0
ruruuyruruuy
ru
uy
4
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
d
d
240
zzzabazzz
aba
ab
0
abcdcbaabccdba
ab
ba
3
xadyxbay
x
y
3
aba
ba
ab
0
aabbc
a
b
4
s=input()
a=input()
b=input()
ls=len(s)
la=len(a)
lb=len(b)
ss=set()
for i in range(ls-la+1):
	if s[i:i+la]==a:
		for j in range(i,ls-lb+1):
			if s[j:j+lb]==b:
				ss.add(s[i:j+lb])
print(len(ss))