Problem:
Finding a Word Write a program which reads a word W and a text T , and prints the number of word W which appears in text T   T consists of string T i separated by space characters and newlines. Count the number of T i which equals to W . The word and text are case insensitive. Constraints  The length of W ≤ 10  W consists of lower case letters  The length of T in a line ≤ 1000  Input In the first line, the word W is given. In the following lines, the text T is given separated by space characters and newlines. " END_OF_TEXT " indicates the end of the text. Output Print the number of W in the text. Sample Input computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the new era.
Provides an outstanding computer environment.
END_OF_TEXT Sample Output 3

Solution (Python):
import sys
w = input()
print(sys.stdin.read().lower().split().count(w))

Solution (Python):

import re
cnt = 0
c = 0
n = str(input())
while True:
    l = str(input())
    if l == 'END_OF_TEXT':
        break
    x = l.lower()
    y = x.split()
    c += y.count(n)
print(c)

Solution (Python):
w = input()
cnt = 0
while True:
    str = input()
    if str == 'END_OF_TEXT':
        break
    str = str.lower()
    lst = str.split()

    
    

    for i in range(len(lst)):
        if w == lst[i]:
            cnt += 1

print(cnt)

Solution (Python):
w = input()
w = w.upper()

a = 0

while True:
    s = input()

    if s == "END_OF_TEXT":
        break

    s = s.upper()
    s = s.split()

    for i in range(len(s)):
        if s[i]==w:
            a+= 1

print(a)

Solution (Python):

t = str(input())
t = t.lower()
c = 0

while True:
    w = input()
    if w=="END_OF_TEXT":
        break
    else:
        w = w.lower().split()
        c += (w.count(t))
        
print(c)

Solution (Python):


w = input()
c = int(0)
while True:
    T = input()
    if T=='END_OF_TEXT':
        break
    T = T.lower()
    T = T.split()
    c += T.count(w)
    
print(c)

Solution (Python):
w = input()
cnt = 0
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    words = t.lower().split()
    tmp = 0
    for i in words:
        if i == w:
           tmp += 1
    cnt += tmp
print(cnt)

Solution (Python):



W = input()

try:
   S = 0
   while True:
      T = input()
      if T == "END_OF_TEXT":
         break
      T = T.lower()
      T = T.split(" ") 
      
      
      for i in range(len(T)):
         if W == T[i]:
            S += 1
      
except EOFError:
   pass

print(S)

Solution (Python):
def resolve():
    import re
    W = input()
    s = input()
    r = re.compile(r"\b" + W + r"\b", flags=re.IGNORECASE)
    sumA = 0
    while s != "END_OF_TEXT":
        sumA += len(r.findall(s))
        s = input()
    print(sumA)


resolve()

Solution (Python):
W = input().lower()

text = ""; all_text = ""
while text != "END_OF_TEXT":
    text = input()
    all_text += text + " "
    
T = list(all_text.lower().split())[:-1]


count = 0
for i, text in enumerate(T):
    if W == text:
        count += 1

print(count)

Solution (Python):
w = input()
cnt = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break

    line = line.lower()
    pos = 0
    start = 0
    inWord = False
    while pos < len(line):
        if line[pos] == ' ':
            if inWord:
                if w == line[start:pos]:
                    cnt += 1
                inWord = False
        else:
            if not inWord:
                start = pos
                inWord = True
        pos += 1
    if inWord and w == line[start:]:
        cnt += 1

print(cnt)

Solution (Python):
w = input()
t = []
while True:
    tmp = input()
    if tmp == 'END_OF_TEXT':
        break
    else:
        t += list(tmp.lower().split())
print(t.count(w))

Solution (Python):
W = input()
T = []
sum = 0

while True:
    a = input().split()
    if a[0] == "END_OF_TEXT":
        break
    else:
        for i in range(len(a)):
            a[i] = a[i].lower()
        T.append(a)

for i in range(len(T)):
    sum += T[i].count(W)


print(sum)

Solution (Python):
import sys

def find_word_v4():
    W = input()
    s = sys.stdin.readline()
    count = 0

    while s != "END_OF_TEXT\n" and s != "END_OF_TEXT":
        words = s.lower().split()
        count += words.count(W)
        s = sys.stdin.readline()

    print(count)


if __name__ == "__main__":
    find_word_v4()

Solution (Python):
a = str(input())
total = 0
while 1:
    b = str(input()).split()
    if str("END_OF_TEXT") in b:
        break
    for i in b:
        if a == i.lower():
            total += 1
print(total)

Solution (Python):
P = str(input()).upper()

lines = []

while True:
    tmp = str(input())
    if tmp == "END_OF_TEXT":
        break
    lines += tmp.upper().split()
    
ans = 0
for word in lines:
    if word == P:
        ans += 1
print(ans)

Solution (Python):
W = input()
w = len(W)

TLIST = []
while True:
    T = input()
    
    if T=='END_OF_TEXT':
        break
    
    T = T.lower()
    Tlist = T.split(' ')
    TLIST.append(Tlist)

TLISTl = len(TLIST)

count = 0
for i in range(TLISTl):
    text = TLIST[i]
    textl = len(text)
    for k in range(textl):
        if text[k]==W :
            count += 1

print(count)

Solution (Python):
word = input()
textArray = []

while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    T = T.lower().split()
    textArray += T
    
answer = 0
word = word.lower()
for v in textArray:
    if v == word:
        answer += 1
print(f"{answer}")

Solution (Python):
import sys

F = sys.stdin
search_word = F.readline()
search_word = search_word.rstrip()
sentence = []
cnt = 0

for line in F:
    if line == F:
        continue
    if line == "END_OF_TEXT":
        break
    
    line = line.rstrip()
    line = line.split()
    tmp = []
    for j in line:
        j = j.lower()
        tmp.append(j)
    sentence.extend(tmp)
    
for i in sentence:
    if search_word == i:
        cnt += 1
        
print(cnt)

Solution (Python):
import sys

w = input()
w.replace('\n','')
cnt = 0

for l in sys.stdin:
    if l == "END_OF_TEXT\n":
        break
    l = l.lower()
    word = l.split()
    cnt = cnt + word.count(w)

print(cnt)

Solution (Python):
W=input().lower()
ans=0
while True:
    T=str(input())
    if T=="END_OF_TEXT":
        break
    ans+=(T.lower().split().count(W))
print(ans)

Solution (Python):
target = input()
count = 0

while True:
    word_list = [x for x in input().split()]
    if word_list[0] == "END_OF_TEXT":
        break
    else:
        for word in word_list:
            if target == word.lower():
                count += 1

print(count)

Solution (Python):
W = input()
x = 0
while 1:
  T = input()
  if T == 'END_OF_TEXT':
    break
  else:
    x += T.lower().split().count(W)
print(x)

Solution (Python):
W = input()
n = 0
while True :
    T = input()
    if T== "END_OF_TEXT" :
        break
    small_T = list(T.split())
    for i in range(len(small_T)) :
        if str.lower(small_T[i]) == str.lower(W) :
            n += 1
print(n)

Solution (Python):
T = input()
T = T.lower()
W = []
cnt = 0

while True:
    A = list(map(str, input().split()))
    if 'END_OF_TEXT' in A:
        break
    else:
        for word in A:
            word = word.lower()
            if word == T:
                cnt += 1
        
print(cnt)

Solution (Python):
word=input()
ans = 0
while True:
    s = input()
    if s != 'END_OF_TEXT':
        s = s.lower()
        x = list(s.split(' '))
        ans +=x.count(word)
    else:
        print(ans)
        break

Solution (Python):
w = input()
cnt = 0
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    for word in t.split(' '):
        if word.lower() == w:
            cnt += 1
print(cnt)

Solution (Python):
w=input()
count=0
while True:
    l=input()
    if l=='END_OF_TEXT':break
    count += l.lower().split().count(w)

print(count)

Solution (Python):
count = 0
word = input()
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    
    for w in line.lower().split():
        if word == w:
            count += 1
            
print(count)

Solution (Python):
w = input();s=[]
while 1:
    a = input()
    if a == 'END_OF_TEXT':break
    s += a.lower().split()
print(s.count(w))

Solution (Python):
w = str(input()).upper()
T = []
count = 0
while True: 
    t = str(input())
    if t == 'END_OF_TEXT': break
    T += t.upper().split()
for word in T:
    if w == word:
        count += 1
        
print('{}'.format(count))

Solution (Python):
W = input()

sentence = ''
while True:
    temp = input()
    if temp == 'END_OF_TEXT':
        break
    sentence += ' ' + temp

t = sentence.lower().split()

print(t.count(W))

Solution (Python):
import sys
w = input().lower()
l = sys.stdin.read().lower()
l = l.split()
print(l.count(w))

Solution (Python):
target = input()
cnt = 0
while True:
  serach_sentence = list(input().split())
  if serach_sentence[0] == 'END_OF_TEXT':
    break
  
  for sen in serach_sentence:
    if target == sen.lower():
      cnt += 1
print(cnt)

Solution (Python):
import sys
W = input().lower()
arr = []
for line in sys.stdin:
    if line == 'END_OF_TEXT':
        break
    arr += line.lower().strip('\n').split(' ')

print(len([i for i in arr if i == W]))

Solution (Python):
W = input().lower()
count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    line_words = line.lower().split()
    for line_word in line_words:
        if line_word == W:
            count += 1

print(count)

Solution (Python):
W = input()
ans = 0
while True:
	s = input()
	if s == "END_OF_TEXT":
		break
	for word in s.split():
		if word.lower() == W:
			ans += 1
print(ans)

Solution (Python):
def main():
  t = input().lower()

  r = 0
  while True:
    sentence = input()

    if sentence == 'END_OF_TEXT':
      break

    sentence = sentence.split(' ')
    
    for word in sentence:
      if word.lower() == t:
        r += 1

  print(r)

if __name__ == '__main__':
  main()

Solution (Python):
w = input().lower()
arr = []
while True:
	sinput = list(map(str,input().split()))
	if sinput == ['END_OF_TEXT']:
		break
	for s in sinput:
		arr.append(s.lower())

print(arr.count(w))

Solution (Python):
W = input().lower()
count = 0

while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    count += T.lower().split().count(W)

print(count)

Solution (Python):
word = input()
import sys
text = sys.stdin.read().lower()
text = text.split()
print(text.count(word))

Solution (Python):
w = input()
t = ""

while True:
    it = input()
    if it == "END_OF_TEXT":
        break
    it = it + " "
    t += it
t = str.lower(t)
t = t.split()

ans = 0

for i in t:
    if i == w:
        ans += 1

print(ans)

Solution (Python):
import sys 

W=input()
text=sys.stdin.read()
print(text.lower().split().count(W))

Solution (Python):
P = str(input()).upper()
line = []

while True:
    tline = str(input())
    if tline == 'END_OF_TEXT':
        break
    line += tline.upper().split()

ans = 0

for tword in line:
    if tword == P:
        ans += 1

print(ans)

Solution (Python):
w = input()
cnt = 0
while 1:
    ts = input().split()
    if ts == ["END_OF_TEXT"]:
        break
    ts = list(map(str.lower,ts))
    for t in ts:
        if t == w:
            cnt += 1
print(cnt)

Solution (Python):
W = input()
S = []

while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    S += (t.lower().split())
print(S.count(W))

Solution (Python):
n=input()
n=n.lower()
count=0
while 1:
    l=list(input().split())
    if l[0]=="END_OF_TEXT":
        break
    else:
        for i in l:
            if n==i.lower():
                count+=1
print(count)

Solution (Python):
w = input().lower()

ans = 0

while True:
    t=input()
    if t== 'END_OF_TEXT':
        break
    ans += t.lower().split().count(w)

print(ans)

Solution (Python):
W = input()
Wcnt = 0
while True:
    S = input()
    if S == 'END_OF_TEXT':
        break
    else:
        S_l = S.lower()
        S_list = S_l.split()
        Wcnt = Wcnt + S_list.count(W)
print(Wcnt)

Solution (Python):
import sys

w = input()

print(sys.stdin.read().lower().split().count(w))

Solution (Python):
W = input().lower()

input_str = []

while True:
    input_value = input()
    if input_value == "END_OF_TEXT":
        break
    else:
        input_str.append(input_value.lower().split())

input_str=sum(input_str,[])

count = 0
for i in input_str:
    if W == i :
        count += 1
print(count)

Solution (Python):
w = input()
c = 0
e = "END_OF_TEXT"
end = 0

while end == 0:
    t = input()
    ti = t.split()
    for i in ti:
        if i.lower() == w:
            c += 1
        if i == e:
            end = 1

print(c)

Solution (Python):
W = input()
cnt = 0

while True :
    t = input()
    
    if t == "END_OF_TEXT" :
        break
    else :
        T = t.lower()
        T = T.split()
        
        for i in range(len(T)) :
            if T[i] == W :
                cnt += 1
                      
print(cnt)

Solution (Python):
W = input()
T =[]
count = 0
while True:
    T =input().split()
    if  "END_OF_TEXT" in T:
        break
    else:
        for i in range(len(T)):
            T[i] = T[i].lower()
        count += T.count(W)
        T = []
print(count)

Solution (Python):

word = input()
counter = 0
while 1:
    sentence = input()
    if sentence == 'END_OF_TEXT':
        break
    sentence = sentence.lower()
    l_sentence = sentence.split()
    counter += l_sentence.count(word)

print(counter)

Solution (Python):
s = input()
n = 0
while True:
    llist = input().split(" ")
    if llist[0] == "END_OF_TEXT":
        print(n)
        break
    else:
        i = len(llist)
        for m in range(0,i):
            m = int(m)
            if llist[m].lower() == s:
                n += llist[m].lower().count(s)
        continue

Solution (Python):
import sys

W = input()
T = sys.stdin.read()

print(T.lower().split().count(W))

Solution (Python):
import sys
w = input()
text = sys.stdin.read()
print(text.lower().split().count(w))

Solution (Python):
W=input()
T=[]
while(1):
    t=input()
    if(t=="END_OF_TEXT"):
        break
    T.extend(t.lower().split())

count=0
for t in T:
    if(t==W):
        count+=1
print(count)

Solution (Python):
W = input()
ans = 0
while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    ans += T.lower().split().count(W)
print(ans)

Solution (Python):
W = str(input())
list = []
while True:
    T = str(input())
    if T == "END_OF_TEXT":
        break
    list.append(T.lower())

counter = 0
for i in range(len(list)):
    counter += list[i].split().count(W)
print(counter)

Solution (Python):
w = input()
t = []
while True:
  s = input()
  if s == "END_OF_TEXT":
    break
  t += list(s.split())

cnt = 0
for p in t:
  if w == p.lower() :
    cnt += 1
  
print(cnt)

Solution (Python):
W = input()
T = input().split()

count = 0
while T != ["END_OF_TEXT"]:

    for i in range(len(T)):
        if T[i].lower() == W :
            count += 1
    T = input().split()


print(count)

Solution (Python):
fw = input()
mt = ''
cnt = 0
while True:
    st = input()
    if st == 'END_OF_TEXT':
        break
    elif fw in st.lower():
        for t in st.lower().split():
            if fw == t:
                cnt += 1

    mt += st.lower()

print(cnt)

Solution (Python):
W = input().lower()
T = []
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    T += t.lower().split()

print(T.count(W))

Solution (Python):
w = input()
count = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    count += sum([1 for t2 in [t.lower() for t in line.split()] if t2 == w])
print(count)

Solution (Python):
import sys
W = sys.stdin.readline().rstrip()
cnt_W = 0

for e in sys.stdin:
    words = []
    if e == "END_OF_TEXT":
        break
    words = list(e.lower().split())
    
    cnt_W += words.count(W)
print(str(cnt_W))

Solution (Python):
W = input().lower()
import sys
T = sys.stdin.read()
T = T.lower().split()
X = T.count(W)
print(X)

Solution (Python):
word = input()
text = []
while True:
    line = input()
    if(line == "END_OF_TEXT"): break
    [text.append(str.lower()) for str in line.split()]
    
ans = 0
for str in text:
  if str == word: ans += 1

print(ans)

Solution (Python):
w = input()
T = []

while True:
    t = list(input().split())
    if t == ['END_OF_TEXT']:

        break
    else:
        t = [s.lower() for s in t]
        T.append(t)

total = 0
for line in T:
    total += line.count(w.lower())

print (total)

Solution (Python):
target = input()
lst = []
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    else:
        lst.append(line.split())
c = 0
for line in lst:
    for word in line:
        if word.lower() == target.lower():
            c += 1
print(c)

Solution (Python):
word = input().lower()
count = 0
while True:
    text = input()
    if text == "END_OF_TEXT":
        break
    count += text.lower().split().count(word)
print(count)

Solution (Python):
w = input().lower()

ans = 0

while True:
        Text = input()
        if Text == "END_OF_TEXT":
                break
        else:
                Text = [t.lower() for t in Text.split()]

                for t in Text:
                        f = 0
                        if len(t) == len(w):
                                f = 1
                                for i,j in zip(t,w):
                                        if i != j:
                                                f = 0
                                                break
                                        
                                if f == 1:
                                        ans += 1


print(ans)

Solution (Python):
import itertools


if __name__ == "__main__":
    matching_word = input()

    matching_word = matching_word.lower()

    text = []

    while True:
        line = input()

        if line == 'END_OF_TEXT':
            break

        text.append(line)

    words = list(map(lambda word: word.lower(), itertools.chain.from_iterable(map(lambda line: line.split(), text))))

    num_occurrences = words.count(matching_word)

    print(num_occurrences)

Solution (Python):
import sys
w=input()
t=sys.stdin.read().lower().split()
print(t.count(w))

Solution (Python):
import sys
w = input()
text = sys.stdin.read()
print(text.lower().split().count(w))

Solution (Python):
word = str(input()).upper()
paragraph = []

while True:
    sentence = str(input())
    if sentence == 'END_OF_TEXT':
        break
    else:
        paragraph += sentence.upper().split()

ans = 0

for para_word in paragraph:
    if para_word == word:
        ans += 1

print("%d"%(ans))

Solution (Python):
W = input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Solution (Python):
def main():
    W = input()
    answer = 0
    while True:
        T = input()
        if T == 'END_OF_TEXT':
            break
        for word in T.split():
            answer += 1 if word.lower() == W else 0 
    print(answer)

if __name__ == '__main__':
    main()

Solution (Python):
word = input()

count = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    count += len(list(filter(lambda s: s.lower() == word, line.split())))

print(count)

Solution (Python):
W = input()
cnt = 0
for s in iter(input,'END_OF_TEXT'):
    L = s.split(' ')
    for l in L:
        if W == l.lower():
            cnt += 1
print(cnt)

Solution (Python):
sentence = []
cnt = 0
for string in iter(input, "END_OF_TEXT"):
    if cnt == 0:
        w = string.lower()
    else:
        sentence.append(string.lower().rstrip(".").split())
    cnt += 1

w_cnt = 0

for s in sentence:
    w_cnt += sum([1 for i in s if i == w])

print(w_cnt)

Solution (Python):
w = input()
count = 0

while True:
    t = input().split()
    if "END_OF_TEXT" in t:
        break

    t = [word.lower() for word in t]
    if w in t:
        count += t.count(w)

    
print(count)

Solution (Python):
word=input()
count=0
while True:
    text=list(input().split())
    if text[0]=="END_OF_TEXT":
        break
    for k in range(0,len(text)):
        if word==text[k].lower():
          count+=1
print(count)

Solution (Python):
w = input()

s = []
while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    s += tmp.lower().split()

print(s.count(w))

Solution (Python):


W = input().lower()

ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Solution (Python):
import sys

w=input()

print(sys.stdin.read().lower().split().count(w))

Solution (Python):
import sys

W = sys.stdin.readline().rstrip().lower()
T = list(sys.stdin.read().lower().split())

print(T.count(W))

Solution (Python):
import sys
W, T = sys.stdin.read().split(maxsplit=1)
print(T.lower().split().count(W))

Solution (Python):



W = input()


word_count = 0
is_finish = False


while True:
    word_list = input().split()
    for w in word_list:
        if w=='END_OF_TEXT':
            is_finish = True
            break
        w = w.lower()
        if w==W:
            word_count += 1
    if is_finish:
        break


print(word_count)

Solution (Python):
count = 0
word = input()
while True:
	w = input()
	if w == 'END_OF_TEXT':
		break
	for t in w.split():
		if t.lower() == word:
			count += 1
print(count)

Solution (Python):
import sys
word=input()
exam_text=[]
while True:
    text = input().split()
    if text[len(text)-1]=="END_OF_TEXT":
        break
    else:
        exam_text+=text
for i in range(len(exam_text)):
    exam_text[i] = exam_text[i].lower()

print(exam_text.count(word))

Solution (Python):
W = str(input())
W = W.lower()
cnt = 0
while True:
    T = [x for x in input().split()]
    if T==['END_OF_TEXT']:
        break
    for t in T:
        if t.lower()==W:
            cnt+=1
print(cnt)

Solution (Python):
w = input()

tlist = []
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.lower()
    tlist.append(t)
moji = ' '.join(tlist)
word = moji.split()
print(word.count(w))

Solution (Python):
w = input()
c = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    line = line.lower().split()
    c += line.count(w)
print(c)

Solution (Python):
W = input().lower()
ans = 0
while 1:
    S = list(input().split())
    if len(S) == 1 and S[0] == "END_OF_TEXT":
        break
    for i in S:
        if i.lower() == W:
            ans += 1
print(ans)

Solution (Python):
W = input()

T = []
x = 0

while True:
    
    Ti = input().split()
    
    if Ti == ["END_OF_TEXT"]:
        break
        
    T += Ti
    
for i in T:
    i = i.rstrip("." or ",")
    i = i.lower()
   
    if i == W:
        x += 1

print(x)

Solution (Python):
w = input().lower()
cnt = 0
for i in iter(input, 'END_OF_TEXT'):
    cnt += i.lower().split().count(w)
print(cnt)

Solution (Python):
cnt = 0
W = input()
while True:
    T = input().split()
    if T[0] == 'END_OF_TEXT' :
        break
    else :
        T=list(map(str.lower,T)) 
        cnt += T.count(W)

print(cnt)

Solution (Python):
w = input().upper()
ans = 0

while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    s = s.upper().split()
    ans += s.count(w)
print(ans)

Solution (Python):
s = str(input().upper())

count = 0
while True:
  moji = str(input())
  if moji == "END_OF_TEXT":
    break;
  elif moji == "end_of_text":
    continue;
  else:
    let = moji.upper()
    lst = let.split()
    count += lst.count(s)
print(count)

Solution (Python):
W=input()
sum=0
while 1:
    s=input()
    if s=="END_OF_TEXT":
        break
    s_=s.split()
    for i in s_:
        if i.lower()==W.lower():
            sum+=1
print(sum)

Solution (Python):
count = 0
W = input().upper()

while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    count += T.upper().split().count(W)
        
print(count)

Solution (Python):
import sys
w = input()
print(sys.stdin.read().lower().split().count(w))

Solution (Python):
W = input().lower()
cntw = 0

while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    T = T.lower()
    L = T.split()
    cntw += L.count(W)

print(cntw)

Solution (Python):
w = input()
ans = 0

while True:
    try:
        t = input()
    except:
        break
    
    t = t.lower()
    t = t.split(" ")
    for i in t:
        if i == w:
            ans += 1
            
print(ans)

Solution (Python):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)







def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




s = input()

tmp = sys.stdin.read().lower().split()

print(tmp.count(s))

Solution (Python):
target = input()
cnt=0
while True:
    s=input()
    if s == "END_OF_TEXT":
        print(cnt)
        exit()
    cnt+=s.lower().split().count(target)

Solution (Python):
w = input().lower()
c = 0
while True:
    t = input()
    if t == 'END_OF_TEXT':break
    t = t.lower().split()
    c+=t.count(w)
print (c)

Solution (Python):
w = input()

t = []
while True:
    t0 = input()
    if t0 == 'END_OF_TEXT':
        break
    t.append(t0)

tt = []
for s in t:
    for s_sp in s.split():
        tt.append(s_sp)

count = 0
for s in tt:
    if w == s.lower(): count += 1

print(count)

Solution (Python):
import re
W = input()
T = input()
T = T.lower()
L = []
while T != 'END_OF_TEXT':
    L.append(re.split(r'\s',T.lower()))
    T = input()
n = 0
for i in range(len(L)):
    for j in range(len(L[i])):
        if L[i][j] == W:
            n += 1
    
    
print(n)

Solution (Python):
W = input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    ans = 0
    word = input().strip()
    while True:
        s = input().strip()
        if s == "END_OF_TEXT":
            break
        for w in s.split():
            if word == w.lower():
                ans += 1
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys

target = input()
s = ""

while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    s += tmp + " "

words = s.lower().split()

print(words.count(target))

Solution (Python):
target = input()
count = 0

while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    words = line.lower().split()
    count += words.count(target.lower())

print(count)

Solution (Python):

word = input()
count = 0
while True:
    sentence = input()
    if sentence == 'END_OF_TEXT':
        break
            
    count += sentence.lower().split().count(word)

print(count)

Solution (Python):
W = input().upper()
line =[]

while True:
    temp_line = input()
    if temp_line == "END_OF_TEXT":
        break
    line += temp_line.upper().split()

ans = 0

for temp_word in line:
    if temp_word == W:
        ans += 1

print(ans)

Solution (Python):
W = input().lower()
ans = 0
while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    for t in T.split():
        if W == t.lower():
            ans += 1
print(ans)

Solution (Python):
word = input()
sentences = []
while True:
  s = input()
  if s == "END_OF_TEXT":
    break
  sentences += list(map(lambda sentence:sentence.lower(),s.split()))
print(sentences.count(word))

Solution (Python):
w = input()
t_list = list()
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    t_list.append(t)

cnt = 0
for t in t_list:
    for word in t.split(" "):
        if w.lower() == word.lower():
            cnt += 1

print(cnt)

Solution (Python):
import sys

w = input()

print(sys.stdin.read().lower().split().count(w))

Solution (Python):
cnt = 0
W = input()
while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    else:
        cnt += T.lower().split().count(W)
print(cnt)

Solution (Python):
if __name__ == '__main__':
    keyword = input()
    sentence = ''
    while(True):
        cont = input()
        if cont == 'END_OF_TEXT':
            break
        sentence = sentence + cont + '\r'
    sentence = sentence.lower()
    senten_list = sentence.split()
    num = 0
    for sentence in senten_list:
        if sentence == keyword:
            num += 1
    print(num)

Solution (Python):
W = input()
T = []

while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    else:
        T += s.lower().split()

print(T.count(W))

Solution (Python):
word=input()
num=0
while True:
    lst=input().split()
    if lst[0]=='END_OF_TEXT':
        break
    lst=[i.lower() for i in lst]
    num+=lst.count(word)
    
print(num)

Solution (Python):
word = input().upper()
cnt = 0

while True:
    letter = input()

    if letter == 'END_OF_TEXT':
        break

    letter = letter.upper().split()

    cnt += letter.count(word)

print(cnt)

Solution (Python):
w = input()
cnt = 0
a = []
while True:
    t = input()
    if "END_OF_TEXT" in t:
        break
    a += t.lower().split()
for i in a:
    if i == w:
        cnt += 1
print(cnt)

Solution (Python):
w=input().upper()
cnt=0
while True:
    block=input()
    if block == 'END_OF_TEXT':
        break
    else:
        z=block.upper().split()
        a=z.count(w)
        cnt += int(a)
print(cnt)

Solution (Python):
s=input()
count=0
while True:
    try:
        a=list(input().split())
    except:
        break
    for i in a:
        if s==i.lower():
            count+=1
print(count)

Solution (Python):
W = input()
T = []
count = 0
while True:
    s = list(map(str,input().split()))
    if s[0] == "END_OF_TEXT":
        break
    T.extend(s)
for t in T:
    if t.lower() == W:
        count += 1
print(count)

Solution (Python):
W = input()

cnt = 0
while True:
    s = input()
    if s == "END_OF_TEXT":
        print(cnt)
        exit()
    s = s.lower()
    sl = list(s.split())
    cnt += sl.count(W)

Solution (Python):
con = input().lower()
ans = 0
while True:
    a = input()
    if a == "END_OF_TEXT":
        break
    else:
        ans += a.lower().split().count(con)
            
print(ans)

Solution (Python):
W = input()
T = []
while True:
    a = input().split()
    if a == ["END_OF_TEXT"]:
        break
    else:
        for i in a:
            T.append(i)
cnt = 0
for i in range(len(T)):
    if str.lower(T[i]) == W:
        cnt += 1
print(cnt)

Solution (Python):
import sys
word=input()
text=sys.stdin.read()    
print(text.lower().split().count(word))

Solution (Python):
W = input()
count_same = 0

while True:
    T = [x for x in input().split(' ')]
    
    if ''.join(T) == 'END_OF_TEXT':
        break
    
    text_lower = []
    for i in range(len(T)):
        one_T = T[i]
        one_T_list = []
        for k in range(len(one_T)):
            if one_T[k].isupper():
                one_T_lower = one_T[k].lower()
            else:
                one_T_lower = one_T[k]
            one_T_list.append(one_T_lower)
        text_lower.append(''.join(one_T_list))
    
    count_same += text_lower.count(W)
    
print(count_same)