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()
ans = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break

    line = line.lower()
    texts = line.split()
    for text in texts:
        if text == w:
            ans += 1
print(ans)

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

while True:
    sc = input()
    if sc == 'END_OF_TEXT':
        break;
    list = sc.split()
    for word in list:
        word.replace('.','')
        if w == word.lower():
            count += 1
print(count)

Solution (Python):
W = input()
count = 0
while 1:
    S = input()
    if S == 'END_OF_TEXT':
        print(count)
        break
    s = S.lower().split()
    for x in s:
        if x == W:
            count += 1

Solution (Python):
W = input()
W = '^' + W + '$'
c = 0
while True:
    Ti = input()
    if Ti == 'END_OF_TEXT':
        break
    c += sum(['^' + t + '$' == W for t in Ti.lower().split(' ')])
print(c)

Solution (Python):
import sys
import itertools
import math



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

W = readline().decode('utf8').rstrip()

T = read().decode('utf8').lower().split()
print(T.count(W))

Solution (Python):
W = input().lower()
T = []
while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    T += tmp.lower().split(" ")
print(len(list(filter(lambda x: x == W, T))))

Solution (Python):
import sys
w = input()

print(sys.stdin.read().lower().split().count(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):
import sys
W = input()
W = W.upper()

count = 0

for T in sys.stdin :
    if T == "END_OF_TEXT" :
        break
    T = T.upper()
    T = T.split()
    for t in T :
        if t == W :
            count += 1

print(count)

Solution (Python):
w = str(input()).lower()
ans = 0
while True:
    s = list(map(str, input().split()))
    if s[0] == "END_OF_TEXT": break
    for i in range(len(s)):
        if s[i].lower() == w: ans += 1
print(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):
import collections 
import sys
w = input()
t = []
while True:
    tmp = input()
    if tmp=='END_OF_TEXT':
        break
    t.extend(tmp.lower().split())

c = collections.Counter(t)
print(c[w])

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

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

print(count)

Solution (Python):
w = input()
*t, = map(str, input().split())
ans = 0
while t[0] != "END_OF_TEXT":
    ans += sum(map(lambda x: x.lower() == w, t))

    *t, = map(str, input().split())

print(ans)

Solution (Python):
w = input()
t = ''
while True:
    s = input()
    if s == 'END_OF_TEXT':
        break
    else:
        s = s.replace('-', ' ').replace('.', '').replace('"', '')
        t += ' ' + s.lower()
t = t.split()
print(t.count(w))

Solution (Python):
s = 0
b = input().lower()

while(True):
    a = input()
    if(a=="END_OF_TEXT"):
        break
    a = a.lower()
    nn = a.split(" ")
    for n in nn:
        if (n == b):
            s += 1
print(s)

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

count = 0

while True:
    
    line = input()
    
    if line == 'END_OF_TEXT':
        break
    
    for s in line.split():
        if s.upper() == w:
            count += 1
print(count)

Solution (Python):
st = input().lower()
cnt = 0
while True:
    try:
        txt = list(input().lower().split())
        for t in txt:
            if t==st:
                cnt+=1
    except:
        break

print(cnt)

Solution (Python):
import sys

W = str(input()).upper()

line = []

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

cnt = 0

for tmp_word in line:
  if tmp_word == W:
    cnt += 1
print(cnt)

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

Solution (Python):
w = input()
t = []
tmp = input()
while tmp != "END_OF_TEXT":
    lst = tmp.split(' ')
    for i in range(len(lst)):
        t.append(lst[i])
    tmp = input()

ans = 0
for i in range(len(t)):
    count = 0
    if (len(t[i]) == len(w)):
        for j in range(len(w)):
            if (t[i][j] == w[j]):
                count += 1
            elif (ord(t[i][j]) + ord("a") - ord("A") == ord(w[j])):
                count += 1
        if count == len(w):
            ans += 1
print(ans)

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

EOT = "END_OF_TEXT"

while True:
    inp = input()
    if inp == EOT:
        break

    sentence.append((inp.lower()).split())

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

print(answer)

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

w=input()

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

Solution (Python):

import sys

w=input()

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

Solution (Python):
w = input().upper()
t = ''
for _ in range(10000):
    te = input()
    if te == 'END_OF_TEXT':
        break
    else:
        t += (' ' + te.upper() + ' ')

t_list = t.split()
print(t_list.count(w))

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

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

Solution (Python):

juge_letter = input().lower()
input_letter = list()
while True:
    input_letter_temp = input()
    if input_letter_temp == "END_OF_TEXT":
        break
    input_letter += input_letter_temp.lower().split()


print(input_letter.count(juge_letter))

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

Solution (Python):
W = input()
count = 0
while True:
    *T, = input().split()
    if T[0] == 'END_OF_TEXT':
        break
    T = [t.lower() for t in T]
    count += T.count(W)
print(count)

Solution (Python):
search = input().lower()
ans = 0
while True:
    s = input().split()
    if s[0] == "END_OF_TEXT":
        break
    
    s = [i.lower() for i in s]


    ans += s.count(search)

print(ans)

Solution (Python):
B=[]
A = str(input())
A= A.lower()
while True:
    B.extend(input().split())
    if B.count('END_OF_TEXT')==1:
        break
B = list(map(str.lower,B))
print(B.count(A))

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

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):
W = input()
T = ""
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    T = T + " " + t.lower()
print(T.split().count(W))

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

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

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

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

Solution (Python):
w = input()
ans = 0
while True:
	line = input()
	if line == "END_OF_TEXT":
		break
	ans += list(map(lambda x:x.lower(), line.split())).count(w)
print(ans)

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

ctr = 0
while 1:
  try:
    T = input().lower()
    for a in T.split():
      if a == W:
        ctr += 1
  except EOFError:
    break

print(ctr)

Solution (Python):
import re


W = input()
wlen = len(W)


T = ""
while True:
    Ti = input()
    if Ti == "END_OF_TEXT":
        break
    T += Ti + " "


T_list = list(T.split(" "))
result = 0
for t in T_list:
    cnt = len(re.findall(W, t, flags=re.IGNORECASE))
    strlen = len(t)
    if cnt == 1 and strlen == wlen:
        result += 1
    else:
        pass

print(result)

Solution (Python):
w=raw_input()
c=0
while True:
    a=map(str,raw_input().split())
    for i in a:
        if i.lower()==w:
            c+=1
        if i=="END_OF_TEXT":
            break
    else:
        continue
    break
print c

Solution (Python):
def finding_word(target_w, w_list):
    n = w_list.count(target_w)

    print(str(n))

if __name__ == "__main__":

    target_w = input()
    w_list   = list()

    while(True):
        line = input()

        if line == "END_OF_TEXT":
            break

        line = line.split(" ")
        for w in line:
            w_list.append(w.lower())

    finding_word(target_w, w_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):
import collections
import re
import sys


w = input().lower()
t = sys.stdin.read()
t.replace("END_OF_TEXT", "")
t = re.sub(r"[^a-z\s]]", "", t.lower())
t = t.split()
counter = collections.Counter(t)
ans = counter[w]

print(ans)

Solution (Python):
target = input()

count = 0

while True:
    sentence = input()
    if sentence == "END_OF_TEXT":
        break
        
    temp = sentence.split()
    for word in temp:
        
        if word.lower() == target:
            count += 1

print(count)

Solution (Python):
W = input().upper()
count = 0
while True:
    T = input()
    if T == 'END_OF_TEXT':
        break
    for word in T.split():
        if W == word.upper():
            count += 1
print(count)

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

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

Solution (Python):
w = input()
r = 0
while True:
    for s in input().split():
        if s == "END_OF_TEXT":
            print(r)
            exit()
        if s.lower() == w:
            r += 1

Solution (Python):
kw = input()
n_of_kw = 0

while True:
    sentence = input().split(" ")
   
    if sentence[0] == "END_OF_TEXT":
        break
    else:
        sentence2 = []
        for i in sentence:
            sentence2.append(i.lower())
        n_of_kw += sentence2.count(kw)
      
print(n_of_kw)

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

Solution (Python):
import sys
W=input()
s=0
while True:
    a=input()
    if a=="END_OF_TEXT":
        break
    s+=a.lower().split().count(W)
print(s)

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

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

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

print(count_W)

Solution (Python):
W, *S = open(0).read().lower().split()
print(S.count(W))

Solution (Python):
dic = {}
for i in range(97, 123):
    dic[chr(i)] = 0

w = input().strip().lower()

total = 0
while True:
    s = input().strip()
    if s == "END_OF_TEXT":
        break

    for sl in s.lower().split():
        word = ""
        for c in sl:
            if c in dic:
                word += c
        if word == w:
            total += 1

print(total)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    
    s=sys.stdin.readline()[:-1]
    t=sys.stdin.read().split()
    ans=0
    for i,w in enumerate(t):
        nw="".join(c.lower() if c.isupper else c for c in w)
        if nw==s:ans+=1
    print(ans)

main()

Solution (Python):
w = input()

res = 0
while True:
    text = input()

    if text == 'END_OF_TEXT':
        break

    text = text.lower()
    text = text.split(" ")
    for word in text:
        if word == w:
            res += 1

print(res)

Solution (Python):
a = input()
count = 0
words = []
while True:
  word = input().split()
  if word[0] == "END_OF_TEXT":
    break
  for subword in word:
    words.append(subword)
for b in words:
  if b.lower() == a:
    count += 1
print(count)

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

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

Solution (Python):
w = input().lower()
S = []

while True:
    s = input()
    
    if s == 'END_OF_TEXT':
        break
    else:
        S.extend([s_.lower() for s_ in s.split()])
        
count = 0
for s in S:
    if w == s:
        count += 1
        
print(count)

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

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

Solution (Python):
w = input().lower()
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()
n,t = 0,input()
while (t!="END_OF_TEXT"):
        t = list(((t.replace(".","")).lower()).split())
        n += t.count(w)
        t = input()
print(n)

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

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

Solution (Python):
import sys
x=sys.stdin.read().lower()
k=x.split('\n')
t=x.rindex('end_of_text')
k=k[0]
count=-1
curr=1
x=x.split()
while k in x:
    x.remove(k)
    count+=1
print(count)

Solution (Python):
W = input().lower()
T = list(iter(input, 'END_OF_TEXT'))
counter = 0
for t in T:
    for word in t.split():
        if word.lower() == W:
            counter += 1
print(counter)

Solution (Python):
word = input()
text = ''
line = input()
while(line != 'END_OF_TEXT'):
    text = text +' '+ line.lower()
    
    line = input()

token = text.split()
count = 0
for _ in token:
    
    if (_ == word):
        count += 1
        

print(count)

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

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

while True:
    word=input()
    if word=="END_OF_TEXT":
        break
    sen+=word.lower().split()

ans=0

for w in sen:
    if W==w:
        ans+=1

print(ans)

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

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

while True:
    new = input()
    if new == "END_OF_TEXT":
        break
    else:
        line = new.lower().split(" ")
        for word in line:
            if word == W:
                count = count +1
print(count)

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

Solution (Python):
word = input()
words = {}
while True:
    input_line = input()
    if input_line == "END_OF_TEXT":
        break
    for w in input_line.split():
        tmp = words.setdefault(w.lower(), 0)
        words[w.lower()] = tmp + 1
if word in words.keys():
    print(words[word])
else:
    print("0")

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

Solution (Python):
s = input()
s = s.upper()
ans = 0
while True:
    t = input()
    a = t.split(" ")
    for i in range(len(a)):
        x = a[i].upper()
        if x == s:
            ans += 1
    if t == "END_OF_TEXT":
        break
print(ans)

Solution (Python):
searchWord=input()
sentences=[]

while True:
    line=input().split(" ")
    if line==["END_OF_TEXT"]:
        break
    else:
        sentences.append(line)

count=0

for line in sentences:
    for word in line:
        lowerWord=word.lower()
        if searchWord==lowerWord:
            count+=1

print(count)

Solution (Python):
w=input().lower()
ans=0
while True:
    t=input()
    if t=="END_OF_TEXT":
        break
    else:
        t=t.split()
        for i,j in enumerate(t):
          t[i]=j.lower()
        ans+=t.count(w)
print(ans)

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

while True:
    line = input()
    if line == 'END_OF_TEXT':
        break;
    words = line.lower().split()
    for word in words:
        word = word.strip(' .,"\'')
        if word == target:
            word_count += 1
print(word_count)

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

while True:
    text = input()
    if text == "END_OF_TEXT":
        break
    else:
        text_list = text.upper().split()
        counter += text_list.count(W.upper())
        
print(counter)

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

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

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

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

print(count)

Solution (Python):
import sys

w = str(input()).lower()
text = []

while True:
    words = str(input())
    if words == 'END_OF_TEXT':
        break
    text += words.lower().split()

count = 0
for word in text:
    if word == w:
        count += 1
print(count)

Solution (Python):
word = input()
res = 0
while True:
    temp = input().split()
    if temp == ['END_OF_TEXT']:
        break
    for i in range(len(temp)):
        temp[i] = str.lower(temp[i])
        if temp[i] == word:
            res += 1

print(res)

Solution (Python):
w = input()
t = ""
while True:
    t += "\n" + input()
    if t.endswith("END_OF_TEXT"):
        t = t[:-11]
        break
print(t.lower().split().count(w))

Solution (Python):
counter = 0

n = input()
n = n.lower()

while True:
    m = input()
    if m == "END_OF_TEXT":
        break
    else:
        m = list(m.split())
        for i in m:
            i = i.lower()
            if n == i:
                
                counter += 1
            else:
                pass

print(counter)

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

cnt = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    words = line.lower().split()

    cnt += words.count(W)

print(cnt)

Solution (Python):
import sys
W = input()
anw = 0

for line in sys.stdin.readlines():
    for _ in line.split():
        if _.lower() == W:
            anw += 1
print(anw)

Solution (Python):
W=input()
ans=0
while True:
    l=input()
    if l=='END_OF_TEXT':
        break
    else:
        for elem in l.split():
            if str.lower(elem)==W:
                ans+=1
print(ans)

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

Solution (Python):

import os,re,sys,operator,math,heapq,string



from sys import stdin,setrecursionlimit


setrecursionlimit(10**6)
input=stdin.readline

s=input().rstrip()
ans=0
while 1:
    t=input().rstrip().split()
    if t[0]=="END_OF_TEXT":
        break
    for i in t:
        if s==i.lower():
            ans+=1
print(ans)

Solution (Python):
def foo(S,W):
    kosu=0
    S = S.lower()
    S = S.split()
    for i in range(len(S)):
        if S[i] == W:
            kosu+=1
    return kosu

x=0
W=input()
S=input()
while S != "END_OF_TEXT":
    x += foo(S,W)
    S = input()

print(x)

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

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

print(cnt)

Solution (Python):
word = input()

count = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    list = line.lower().split()
    for i in list:
        if i == word:
            count += 1

print(count)

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

Solution (Python):
import sys
a = sys.stdin.read().lower().split()
print(a[1:-1].count(a[0]))

Solution (Python):
def foo(S,W):
    kosu=0
    S = S.lower()
    S = S.split()
    for i in range(len(S)):
        if S[i] == W:
            kosu+=1
    return kosu

x=0
W=input()
S=input()
while S != "END_OF_TEXT":
    x += foo(S,W)
    S = input()

print(x)

Solution (Python):
T=""
Fword = input().lower()
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    T += s.lower()
    T += " "


list = T.split()


sum=0
for word in list:
    if word == Fword:
        sum+=1

print(sum)

Solution (Python):
def test():

	W = input()
	counter = 0

	while True:

		tmp_T = input()
		if tmp_T == "END_OF_TEXT":
			break

		T = tmp_T.split()

		for word in T:
			if word.upper() == W.upper():
				counter += 1

	print(counter)


if __name__ == "__main__":
	test()

Solution (Python):


s = 0
w = input()
while True:
    t = input()
    if 'END_OF_TEXT' in t:
        break
    t = t.lower()
    wl = list(map(str, t.split()))
    s += wl.count(w)
print(s)

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 i == w:
            count += 1

print(count)

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

while True:
  temp = input()
  if temp == "END_OF_TEXT":
    break
  else:
    text += temp + " "

print(text.lower().split(" ").count(w))

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

print(T.count(W))

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):
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):
 
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()
print(sys.stdin.read().lower().split().count(W))

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()
ans = 0
while 1:
    T = input()
    if T == "END_OF_TEXT":
        break
    ans += T.lower().split().count(W)
print(ans)

Solution (Python):
def Word(a):
    res = ""
    for c in a:
        if(ord('A') <= ord(c) <= ord('Z')):
            res += chr(ord(c) - ord('A') + ord('a'))
        else:
            res += c
    return res
 
w = Word(input())
ans = 0
 
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
 
    s = list(map(str, s.split()))
    for x in s:
        if Word(x) == w:
            ans += 1
 
print(ans)

Solution (Python):
lq = []
lw = []
key = str(input()).lower()
while True:
    s = list(map(str, input().split()))
    if s[0] == "END_OF_TEXT":
        break
    lq.append(s)
for i in range(len(lq)):
    lw = lw + lq[i]
r = 0
for i in range(len(lw)):
    if lw[i].lower() == key:
        r = r + 1
print(r)

Solution (Python):
import sys

W = input()
S = sys.stdin.readlines()
count = 0
for l in S:
	for w in l.strip().split(" "):
		count += (W == w.lower())
print(count)

Solution (Python):
w = input();count = 0;word = '';T = []
w = w.lower()
while True:
    t = input()
    if t=='END_OF_TEXT':
        break
    t = t.lower()
    T.append(t)


for i in range(len(T)):
    for j in range(len(T[i])):        
        if 'a'<=T[i][j]<='z':
            word += T[i][j]
        if T[i][j]==' ' or j==len(T[i])-1:
            if word == w:
                count+=1
            word =''
    
print(count)

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

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

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

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

ans = 0
for tmp in T:
  if tmp == W:
    ans +=1

print("{:d}".format(ans))

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

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

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

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

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

Solution (Python):






import sys
import math


class mymath:
    
    pi = 3.14159265358979323846264338

    
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()


class output:
    
    def list(self, l):
        l = list(l)
        
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()






































def get_input():
    N = []
    while True:
        try:
            N.append(input())
            
            
        except EOFError:
            break
    return N

def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()

def dist(A, B):
    d = 0
    for i in range(len(A)):
        d += (A[i]-B[i])**2            
    d = d**(1/2)
    return d

S = get_input()

ans = 0

for s in S[1:-1]:
    a = S[0].upper()
    for b in [x for x in s.split()]:
        if a == b.upper():
            ans += 1
    
print(ans)

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()
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()
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()
answer = 0
while 1:
    T = input()
    if T == "END_OF_TEXT":
        break
    answer += T.lower().split().count(W)
print(answer)

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