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):
W = input().lower()
count = 0
line = []
while True:
    tmp_line = input()
    if tmp_line == "END_OF_TEXT":
        break
    line += tmp_line.lower().split()    
    
for word in line:
    if word == W:
        count += 1
    else:
        pass    
print(count)

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

Solution (Python):
count = 0

W = input()

while True:
    line = input()

    if 'END_OF_TEXT' == line:
        break

    words = line.split()

    for word in words:
        if W == word.lower():
            count += 1

print(count)

Solution (Python):

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

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

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

print(count)

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

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

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

print(count)

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

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

Solution (Python):
import sys
 
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001
 
 
P = str(input()).upper()
line = []
 
while True:
    tmp_line = str(input())
    if tmp_line == 'END_OF_TEXT':
        break
    line += tmp_line.upper().split()
 
ans = 0
 
for tmp_word in line:
    if tmp_word == P:
        ans += 1
 
print("%d"%(ans))

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

Solution (Python):
count=0
str=[]
try:
    word=input()
    while True:
        str+=list(input().split())
except EOFError:
    pass
for i in range(len(str)):
    if str[i].lower()==word:
        count+=1
    elif str[i]=='END_OF_TEXT':
        print(count)
        break

Solution (Python):
w = input().lower()
text = []
for s in iter(input, 'END_OF_TEXT'):
    text += s.lower().split()
ans = 0
for line in text:
    if w == line:
        ans += 1
print(ans)

Solution (Python):
if __name__ == "__main__":
    total_occurence_num = 0
    word = input()
    while(True):
        input_str = input()
        if (input_str == "END_OF_TEXT"):
            break
        total_occurence_num += sum(map(lambda w: w == word, input_str.strip(".").lower().split()))
    print(f"{total_occurence_num}")

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

Solution (Python):
ans = 0
word = raw_input().lower()
while True:
    INPUT = raw_input().split()
    if INPUT[0] == "END_OF_TEXT":
        break
    for i in INPUT:
        if i.lower() == word:
            ans += 1
print ans

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

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

Solution (Python):
w=input().lower()
c=[]
s=input()
while(s!='END_OF_TEXT'):
    c+=s.lower().split();
    s=input()
print(len([x for x in c if x==w]))

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

T_list=[]
while True:
  t = list(map(str, input().split()))
  if 'END_OF_TEXT' in t:
      break
  for i in t:
    T_list.append(str.lower(i))

a = 0
for i in T_list:
  if W == i:
    a = a + 1

print(a)

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

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

  count += T.count(W)
print(count)

Solution (Python):
W = input()

counter = 0
while True:
    T = input().split()
    if T[0] == "END_OF_TEXT":
        break

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

print(counter)

Solution (Python):
input_word=""
input_text=[]
temp=[]
flg=0
text=""

import re 

input_word=input()

input_word="\s"+input_word+"\s"

while flg==0:
    input_line=input()
    if input_line=="END_OF_TEXT":
        flg=1
        input_line=""

    else:
        temp=input_line.split()
        input_text.extend(temp)
        temp=[]

for i in input_text:
    text=text+" "+i+" "
matchOB=re.findall(input_word,text, re.IGNORECASE)
print(len(matchOB))

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

for i in range(len(T)):
    for j in T[i]:
        if W == j:
            count = count + 1
        

print(count)

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

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

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

t=[i.lower() for i in t]

print(t.count(w))

Solution (Python):
import sys
w = input()
print(''.join(sys.stdin.readlines()).replace('\n', ' ').lower().split().count(w))

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

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

Solution (Python):
W=input()
check=0
S=[]
while check==0:
    s=input().split()
    if s!=["END_OF_TEXT"]:
        ls = len(s)
        for i in range(ls):
            S.append(s[i])
    else:
        check=1
count=0
l=len(S)
for i in range(l):
    if S[i].upper()==W.upper():
        count+=1
print(count)

Solution (Python):

w = input()
count = 0

while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    else:
        t = t.lower().split()
        for i in range(len(t)):
            if t[i] == w:
                count+=1

print(count)

Solution (Python):
W = input()

count = 0
while True:
  T = input()
  if T == 'END_OF_TEXT':
    break
    
  for i in T.lower().split():
    if i == W:
      count += 1
print(count)

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

Solution (Python):
w=input().lower()
c=[]
s=input()
while(s!='END_OF_TEXT'):
    c+=s.lower().split();
    s=input()
print(len([x for x in c if x==w]))

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

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

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

Solution (Python):
a=0
s=input().lower()
while True:
    t=input()
    if t=="END_OF_TEXT":
        break
    else:
        a+=sum(i.lower()==s for i in t.split())

print(a)

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

ans =0

while True:
  ss = input()
  
  if ss == 'END_OF_TEXT':
    break
    
  ans += len([x for x in ss.lower().split() if x ==word])
  
print(ans)

Solution (Python):
W = input()

answer = 0

while True:

    line = input()

    if line == "END_OF_TEXT":
        break

    answer += line.lower().split().count(W)


print(answer)

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

Solution (Python):
import sys

P=str(input()).upper()
line=[]


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

ans = 0

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

print("%d"%(ans))

Solution (Python):

import sys

W = input()
T = []
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    T.append(line)
    
count = 0
for line in T:
    
    words = line.split()
    for word in words:
        if W == word.lower():
            count+=1
print(count)

Solution (Python):
if __name__ == "__main__":
    target = input()
    res = 0
    line = input()
    while line != "END_OF_TEXT":
        res += [x.lower() for x in line.split()].count(target)
        line = input()

    print(res)

Solution (Python):
W = input()
ans = 0
S = input()
while S != 'END_OF_TEXT':
    ans += [w.lower() for w in S.split()].count(W)
    S = input()
print(ans)

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

print(num)

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

print(count)

Solution (Python):



import sys

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

Solution (Python):
if __name__ == '__main__':
	W = str(input())
	T = " "
	d = str(input())
	T += d + " "
	while d != "END_OF_TEXT":
		d = str(input())
		T += d+" "
	c = 0
	T = T.lower().replace("\"","").replace("\'","")
	while True:
		if T.find(" "+W+" ") == -1:
			break
		else:
			T=T.replace(" "+W+" "," ",1)	
			c += 1	
	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):
word = input()
count = 0
while True:
    s = input().split()
    if s[0] == "END_OF_TEXT":
        break
    for i in s:
        if i.lower() == word.lower():
            count += 1
print(count)

Solution (Python):
x = input()
y = ''
c = 0
while 1:
    p = input()
    if p == 'END_OF_TEXT':
        break
    else:
        y += (p + ' ')
for v in str.lower(y).split():
    if x == v:
        c += 1
print(c)

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

Solution (Python):
z = input()
y = []
while True:
    x = input()
    
    if x == "END_OF_TEXT":
        break

    x = x.lower()
    x = x.split()
    y.extend(x)

ans = y.count(z)
print(ans)

Solution (Python):
import string

punc = string.punctuation
s = input()
count = 0
line = input()
while line != 'END_OF_TEXT':
    line = line.lower()
    for p in punc:
        line.replace(p, ' ')
    words = line.split()
    for w in words:
        if w == s:
            count += 1
    line = input()
print(count)

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

Solution (Python):
pattern = input().lower()
contents = []
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    line_list = line.split()
    line_list = [string.lower() for string in line_list]
    contents.append(line_list)

counter = 0
for row in contents:
    match_count = row.count(pattern)
    counter += match_count

print(counter)

Solution (Python):




word_cnt = 0
chk_word = input().lower()

while 1:
    line = input()
    if line == "END_OF_TEXT":
        break
    for word in line.split():
        if word.lower() == chk_word:
            word_cnt += 1
print(word_cnt)

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

i = 0
while True:
  S = input()
  if S == 'END_OF_TEXT':break

  i += S.upper().split().count(W)
print(i)

Solution (Python):
p = str(input()).upper()
line = []
 
while True:
    tmp_line = str(input())
    if tmp_line == 'END_OF_TEXT':
        break
    line += tmp_line.upper().split()
 
ans = 0

for tmp_word in line:
    if tmp_word == p:
        ans += 1
 
print("%d"%(ans))

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

ans = 0
data = []

while True:
  text = input()

  if text == "END_OF_TEXT":
    break

  data = text.upper().split()

  for i in data:
    if word == i:
      ans += 1


print(ans)

Solution (Python):
w = input()

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

num = 0
i = -1
l = len(w)

while True:
        i = str.find(w, i + 1)
        if i == -1:
                break
        elif (i == 0 or str[i-1] == " ") and (i+l == len(str) or str[i+l] == " " or str[i+l] == "." or str[i+l] == ","):
                num += 1

print(num)

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

words = [] 
while True:
    sentence = input()
    if sentence == "END_OF_TEXT": 
        break
    else:
        word = sentence.lower().split() 
        words.append(word) 

count = 0
for i in range(len(words)):
    for j in range(len(words[i])):
        if chk_word == words[i][j]:
            count += 1
print(count)

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

while True:
        i = input()
        if i == 'END_OF_TEXT':
            break
        words = i.lower().split()
        counter += words.count(w)


print(counter)

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

while True:
    ti = input()
    if ti == "END_OF_TEXT":
        break
    ti = list(map(str, ti.split()))
    for i in ti:
        if i.lower() == w:
            ans += 1

print(ans)

Solution (Python):
W = input()
t = []
count = 0
c = 0

while True:
    T = input()
    if T == "END_OF_TEXT":
        break
    else:
        t.append(T)
        c += 1

for i in range(c):
    l = t[i].split()
    m = len(l)
    for j in range(m):
        l[j] = l[j].lower()
        if l[j] == W:
            count += 1

print(count)

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

line = []

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

ans = 0

for i in line:
    if word == i:
        ans += 1

print("%d" %(ans))

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

Solution (Python):
w = input()

r=[]

while 1:
    r1=input()
    if "END_OF_TEXT" in r1:
        break
    else:
        r+=r1.lower().split()
        
count=0
for i in range(len(r)):
    if r[i]==w:
        count+=1


print(count)

Solution (Python):
import sys
w = input()
print (sum([ i.split(' ').count(w) for i in sys.stdin.read().lower().split('\n')]))

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):
w = input()
c = 0
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    else:
        tl = t.split()
        for word in tl:
            k = word.lower()
            if k == w:
                c += 1
print(c)

Solution (Python):
k = input()
con = {k:0}
num = 0
while 1:
    j = input().split()
    for n in range(len(j)):
        if j[n].lower() in con:
            con[j[n].lower() ] += 1
    else:
        if j[n] == "END_OF_TEXT":
            break
print(con[k])

Solution (Python):
s = input()
a = []
while True:
    n = input()
    if n == "END_OF_TEXT":
        break
    a+=[j.lower() for j in n.split()]

print (a.count(s))

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

Solution (Python):
w = input()
t = ""
while True:
  line = input()
  if line == "END_OF_TEXT":
    break
  else:
    t += " " + line.lower()

words = t.split()
counter = 0
for i in range(len(words)):
  if words[i] == w:
    counter += 1

print(counter)

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

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


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

Solution (Python):
def main():
    word = input()

    cnt = 0
    while True:
        text = input()
        text = text.strip()
        if text == "END_OF_TEXT":
            break

        for t in text.split():
            if t.lower() == word:
                cnt += 1


    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):

W = input().rstrip()
num = 0
flag = True
while flag:
    t = input().rstrip().split()
    for i in t:
        if i == "END_OF_TEXT":
            flag = False
            break
        if i.lower() == W:
            num += 1

print(num)

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

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

counter = 0
while True:
    row = input()
    if row != 'END_OF_TEXT':
        counter += row.lower().split().count(word)
    else:
        break
print(counter)

Solution (Python):
w = input()
cnt = 0
while True:
    s = input()
    if s == 'END_OF_TEXT':
        break
    se = ''
    for c in s:
        if ord('A') <= ord(c) <=ord('Z'):
            se += chr(ord(c) + 32)
        else: se += c
    sent = se.split() 
    for wd in sent:
        if wd == w: cnt += 1
print(cnt)

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

while 1:
    t = input()
    if t == "END_OF_TEXT":
        break
    a += t.lower().split().count(w)

print(a)

Solution (Python):
def toSmall(word):
    res = ""
    for c in word:
        if(ord('A') <= ord(c) <= ord('Z')):
            res += chr(ord(c) - ord('A') + ord('a'))
        else:
            res += c
    return res

w = toSmall(input())
ans = 0

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

    s = list(map(str, s.split()))
    for x in s:
        if toSmall(x) == w:
            ans += 1

print(ans)

Solution (Python):
target=input()
cnt = 0
while True:
    line = list(input().split())
    if line[0] == "END_OF_TEXT":
        break
    size = len(line)
    for i in range(size):
        if line[i].lower() == target:
            cnt += 1
print(str(cnt))

Solution (Python):
compare = input().lower()
c = 0
while True:
        str = input()
        if str == "END_OF_TEXT":
                break
        strList = str.split()
        for i in range(len(strList)):
                if compare == strList[i].lower():
                        c += 1

print(c)

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

count = 0

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

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

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

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

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

Solution (Python):
w = input()
t = input()
s = []
while t != "END_OF_TEXT":
	t = t.lower()
	s += list(t.split())
	t = input()
n = 0
for i in range(len(s)):
	if s[i] == w:
		n += 1
print(n)

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

Solution (Python):
w = input()
dic = dict()

while True:
    line = input()
    if line == "END_OF_TEXT":
        break

    for t in line.split():
        dic[t] = dic[t] + 1 if t in dic else 1

ans = 0

for k, v in dic.items():
    if k.lower() == w:
        ans += v

print(ans)

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

Solution (Python):
p = input()

sum = 0
while True:
    a = input()
    if a == 'END_OF_TEXT':
        break
    b = a.lower()
    
    c = b.split()
    
    num = c.count(p)
    sum += num
    
print(sum)

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

Solution (Python):
a = "abcdefghijklmnopqrstuvwxyz"
A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
dic = dict(zip(A,a))

w = input()
tex = []
while(1):
    t = input()
    if t == "END_OF_TEXT":
        break
    tex.extend(t.split())
c = 0
tex_ = []
for i in tex:
    i = list(i)
    for j in range(len(i)):
        if i[j] in A:
            i[j] = dic[i[j]]
    tex_.append("".join(i))
for i in tex_:
    if i == w:
        c += 1
print(c)

Solution (Python):
w = input().lower()
words = []
while True:
    tmp_line = input()
    if tmp_line == "END_OF_TEXT":
        break
    words += tmp_line.lower().split()

    

cnt = 0

for word in words:
    if word == w:
        cnt += 1

print(cnt)

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

Solution (Python):
import sys

w = sys.stdin.readline().strip().lower()

count = 0

for line in sys.stdin:
    text = line.strip()
    if text == 'END_OF_TEXT':
        break
    words = line.lower().split()
    count += words.count(w)

print(count)

Solution (Python):



import sys

w = sys.stdin.readline().strip().lower()

words = list()

while True:
    s = sys.stdin.readline().strip()
    if s == 'END_OF_TEXT':
        break
    words.extend(s.lower().split())

print(words.count(w))

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

while True:
    x = input().split()
    if 'END_OF_TEXT' in x:
        break
    T.append(x)

for i in T:
    i = [j.lower() for j in i]
    c += i.count(W)

print(c)

Solution (Python):
w=input().lower()
c=[];s=input()
while(s!='END_OF_TEXT'):
    c+=s.lower().split();
    s=input()
print(c.count(w))

Solution (Python):
ptn = input()
count = 0
for line in iter(input, 'END_OF_TEXT'):
    count += len([x for x in (line.lower()).split(' ') if x == ptn])
print(count)

Solution (Python):
def main():
	wordCount = {}
	W = input()
	while True:
		line = input()
		if line == 'END_OF_TEXT':
			break
		line = line.lower()
		for word in line.split():
			if word in wordCount:
				wordCount[word] += 1
			else:
				wordCount[word] = 1
	print(wordCount[W])
	
main()

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

Solution (Python):
w=input()
w_count=0
T=[]
t=list(map(str,input().split()))

while t!=['END_OF_TEXT']:
    for i in range(len(t)):
        t[i]=t[i].lower()
    T.append(t)
    t=list(map(str,input().split()))

for i in range(len(T)):
    for j in range(len(T[i])):
        if T[i][j]==w:
            w_count=w_count+1
print(w_count)

Solution (Python):
word =str(input()).lower()
cnt = 0
while True:
    try:
        m = str(input())
    except EOFError:
        break
    if ( m == "END_OF_TEXT"):
        break
    for i in  m.lower().split():
        if ( i == word):
            cnt += 1
print (cnt)

Solution (Python):
def countString(word, text):
    counter = 0
    for t in text:
        if t == word:
            counter += 1
    print(counter)

if __name__ == '__main__':
    w = input()
    mojiretsu = []
    while True:
        s = input()
        if s == "END_OF_TEXT":
            break
        moji = s.lower().split()
        for m in moji:
            mojiretsu.append(m)
    countString(w, mojiretsu)

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

Solution (Python):
w = input()

tlist = []
while(1):
    t = input()
    if t == "END_OF_TEXT":
        break
    t = t.lower()
    tlist.append(t)

tlist1 = " ".join(tlist)

w_list = tlist1.split()

print(w_list.count(w))

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

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

Solution (Python):
import sys

key = input().lower()
count=0
while(1):
    W=(input().split())
    for str in W:
        if(str=="END_OF_TEXT"):
            print(count)
            sys.exit()
        if(str.lower()==key):
            count+=1

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

while True:
    s = input()
    if s == "END_OF_TEXT": break
    lst.extend(s.upper().split())

print(len([x for x in lst if x == W]))

Solution (Python):
W = input()
import sys
T = sys.stdin.readlines()
c = 0
for line in T:
    line1 = line.lower()
    line2 = line1.split()
    
    if "END_OF_TEXT" in line:
        break
    c += line2.count(W)
print(c)

Solution (Python):




W=input()
count=0
while True:
    N=input().split()
    if str(N[0])=="END_OF_TEXT":
        break
    for n in N:
        if W==n.lower():
            count+=1

print(count)

Solution (Python):
word=input()
sentence=[]
while True:
	a=input().split()
	if 'END_OF_TEXT' in a:
		break
	else:
		for i in a:
			sentence.append(i.lower())
print(sentence.count(word))

Solution (Python):
p = input().lower()
n = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    for w in line.lower().split():
        if p == w:
            n += 1
print(n)

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


print(ans)

Solution (Python):
W = input()
T = []
len_w = len(W)
count = 0

str_in = input()
while (str_in != 'END_OF_TEXT'):
    T.append(str_in.lower().split())
    str_in = input()

for item in T:
    for i in item:
        if (i == W):
            count += 1
            
print(count)

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

Solution (Python):
import sys

w = input().lower()
line = sys.stdin.read()
x = line[0:line.find('END_OF_TEXT')].lower().split()
print(x.count(w))

Solution (Python):
from itertools import chain

target = input().lower()
sentence = []

while True:
  line = input()
  if line == 'END_OF_TEXT':
    break
  sentence.append(line.split())

flatten_list = list(chain.from_iterable(sentence))
word_list = [word.strip(',.') for word in flatten_list]
word_list = [word.lower() for word in word_list]
print(len(list(filter(lambda word: word == target, word_list))))

Solution (Python):
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


P = str(input()).upper()
line = []

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

ans = 0

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

print("%d"%(ans))

Solution (Python):
W = input()
T = ""
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    T += t + " "

T = [t.rstrip(",.") for t in T.lower().split()]
print(T.count(W))

Solution (Python):
word = str(input()).lower()
Text = []
while True:
    A = list(map(str, input().split() ) )
    if A == ["END_OF_TEXT"]:
        break
    Text.append(A)

for i in range(len(Text)):
    for k in range(len(Text[i])):
        Text[i][k] = Text[i][k].lower()


count = 0
for i in range (len(Text)):
    count = count + Text[i].count(word)

print(count)

Solution (Python):
W=input()
W=W.lower()
list1=[]

for i in range(1001):
    S=input()
    if S=="END_OF_TEXT":
        break
    else:
        S=S.lower()
        S=S.rstrip().split(" ")
        for j in range(len(S)):
            list1.append(S[j])
print(list1.count(W))

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

Solution (Python):
a = input().lower()
c = []
d = []
while True:
    b = input()
    if b == "END_OF_TEXT":
        break
    else:
        e = b.lower().split()
        k = e.count(a)
        c.append(k)
f = sum(c)
print(f)

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

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

print(count)

Solution (Python):


src = input().lower()
string = []

while True:
    temp = input()
    if 'END_OF_TEXT' == temp:
        break
    else:
        string.extend(list(map(lambda x:x.lower(), temp.split())))

print(string.count(src))

Solution (Python):


import sys

if __name__ == '__main__':
    w = raw_input()
    t = reduce(lambda a,b: a+b, sys.stdin).lower()
    print len(filter(lambda x: x==w, t.split()))

Solution (Python):
word = input().lower()
text = []
c = 0
while True:
    read = input().split()
    if read[0] == 'END_OF_TEXT':
        break
    else:
        text.append(read)
for i in text:
    for n in i:
        if word == n.lower():
            c += 1
print(c)

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

Solution (Python):
W = input().lower()
counter = 0
T = input()
while not T == 'END_OF_TEXT':
	T = T.lower()
	li = T.split(' ')
	for i in li:
		if i == W: counter += 1
	T = input()
print(counter)

Solution (Python):
word = input()
tmp = []
num = 0
for looop in range(0,100000):
    tmp = input().split()
    if tmp[0] == 'END_OF_TEXT':
        break
    else:
        for x in range(len(tmp)):
            if word.lower() == tmp[x].lower():
                num += 1
print(num)

Solution (Python):
cnt = 0
W = raw_input().upper()
while True:
    s = raw_input().split(" ")
    if s == ["END_OF_TEXT"]:
        break

    cnt += map(str.upper, s).count(W)

print cnt