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

Solution (Python):


import fileinput

def main():

    W = input().lower()

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

        for i in inputList:
            if(W == i):
                count += 1

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    W = input().lower()
    words = []
    while True:
        T = input()
        if T == "END_OF_TEXT":
            break

        words.extend(T.split(" "))

    ans = sum(1 for word in words if word.lower() == W)

    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
W=input()
T=[]
while 1:
 a=input()
 if'END_OF_TEXT'==a:break
 T+=[s.lower() for s in a.split()]
print(T.count(W))

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

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

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

Solution (Python):
x = input().lower()
c = 0
while True:
    s = input()
    if s == 'END_OF_TEXT':
        break
    s = s.split()
    for i in s:
        if x == i.lower():
            c += 1

print(c)

Solution (Python):
W = raw_input().lower()
T = []
while 1:
	try:
		T += raw_input().lower().split()
	except:
		break
print T.count(W)

Solution (Python):
W = input().lower()
words = ''
while True:
    word = input()
    if word == 'END_OF_TEXT':
        break
             
    words = words + word.lower() + " "
print(sum([1 for c in words.split() if c == W]))

Solution (Python):
W = input()

c = 0
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    for w in line.lower().split():
        if w == W:
            c += 1
print(c)

Solution (Python):
t = []
w = input().lower()
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    t.extend(s.lower().split())
print(t.count(w))

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 = raw_input().lower()
array = []
cnt = 0
while True:
    line = raw_input()
    if line == "END_OF_TEXT":
        break
    split = line.lower().split()
    for s in split:
        array.append(s)
for word in array:
    if W == word:
        cnt += 1
print cnt

Solution (Python):
c = 0
hoge = ''
while True:
    sent = input()
    if sent.strip() == 'END_OF_TEXT':
        break
    if hoge:
        for word in sent.split():
            if word.lower() == hoge:
                c += 1
    else:
        hoge = sent.strip()
print (c)

Solution (Python):
word, num = input(), 0
while True:
    sentence = input()
    if sentence=="END_OF_TEXT":
        break
    word_list = sentence.lower().replace(".", " ").split()
    for i in word_list:
        if word==i:
            num += 1
print(num)

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

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

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

num_w = 0

while True:
    s_lst = sys.stdin.readline().split()
    if s_lst[0] == 'END_OF_TEXT':
        break
    for str_x in s_lst:
        str_x = str_x.lower()
        if str_x == w:
            num_w += 1

print(num_w)

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

Solution (Python):
import re

def find_a_word(w, t):
    list = []
    for e in map(lambda x: re.split(r'\s|,|\.', x.lower()), t):
        list.extend(e)
    return list.count(w.lower())

if __name__ == '__main__':
    w = input()
    t = []
    while True:
        i = input()
        if i == 'END_OF_TEXT':
            break
        else:
            t.append(i)

    print(find_a_word(w, t))

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

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

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

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

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

Solution (Python):
import sys


t = input()
answerCount = 0
stringList = []
while True:
    line = input()
    if line == "END_OF_TEXT":
        break
    for i in range(len(str(line).lower().split())):
        stringList.append(str(line).lower().split()[i])

        if str(line).lower().split()[i] == t:
            answerCount += 1



print(answerCount)

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

Solution (Python):
w = input()
small = 'abcdefghijklmnopqrstuvwxyz'
large = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
count = 0
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    else:
        stext = ''
        for i in text:
            j = 0
            while j < 26:
                if i == large[j]:
                    stext += small[j]
                    break
                j += 1
            if j == 26:
                stext += i
        t = list(map(str, stext.split(' ')))
        for p in t:
            if p == w:
                count += 1
print(count)

Solution (Python):
def count(word, text):
    """Count the word in text.
    Counting is done case-insensitively.

    >>> count('a', 'A b c a')
    2
    >>> count('computer', 'Nurtures computer scientists' \
              + ' and highly-skilled computer engineers' \
              + ' who will create and exploit "knowledge"' \
              + ' for the new era. Provides an outstanding' \
              + ' computer environment.')
    3
    """
    return (text
            .lower()
            .split()
            .count(word.lower()))


def run():
    word = input()
    text = ""

    line = input()
    while line != "END_OF_TEXT":
        text += line + "\n"
        line = input()

    print(count(word, text))


if __name__ == "__main__":
    run()

Solution (Python):
word = input()
text = []
count = 0

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

print(count)

Solution (Python):
t = input().lower()
cnt = 0
while True:
    w = input()
    if w == 'END_OF_TEXT': break
    cnt += len(list(filter(lambda x: x == t, [v.lower() for v in w.split(' ')])))
print(cnt)

Solution (Python):



w = input()
w = w.upper()
s = []
c = 0
while True:
    i = input()
    if i == "END_OF_TEXT":
        break
    s.append(i.upper())

for i in s:
    for j in i.split(" "):
        if j == w:
            c += 1

print(c)

Solution (Python):
w = input().lower()
cnt = 0
while 1:
  l = input().split()
  if "END_OF_TEXT" in l: break
  for e in l:
    if e.lower() == w: cnt += 1
print(cnt)

Solution (Python):
import sys

W = sys.stdin.readline().strip()
num = 0

while True:
    T = sys.stdin.readline().strip()
    if T == 'END_OF_TEXT':
        break
    t = T.lower()
    T_line = t.split()
    for i in T_line:
        if W == i:
            num += 1

print(num)

Solution (Python):
import sys

l = []
for i in sys.stdin:
    l.append(i.split())

count = 0
for i in range(1,len(l)-1):
    for j in range(0,len(l[i])):
        l[i][j] = l[i][j].lower()
    count += l[i].count(l[0][0])

print(count)

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

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

count = 0

while True:
    w = input()
    if w == 'END_OF_TEXT':
        break
    for x in w.lower().split(' '):
        if taisho == x:
            count += 1

print(count)

Solution (Python):
w = input().lower()
cnt = 0
while True:
	l = input()
	if l == 'END_OF_TEXT':
		break
	for e in l.split():
		cnt += e.lower() == 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().upper()
T = []
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    T += [x.upper() for x in t.split()]
print(T.count(W))

Solution (Python):


import sys

w = sys.stdin.readline().strip()
count = 0

while True:
    t = list(map(str, input().split()))

    if 'END_OF_TEXT' in t:
        break

    for i in range(len(t)):
        if t[i].lower() == w:
            count += 1

print(count)

Solution (Python):
def make_text():
    temp = []
    while True:
        row = input().split()
        if row == ['END_OF_TEXT']:
            break
        temp.append(list(map(lambda x: x.lower(), row)))
    return temp

def find_word(word,text):
    num = 0
    for row in text:
        for t in row:
            if t == word:
                num += 1

    return num

if __name__ == '__main__':
    w = input()
    t = make_text()
    num = find_word(w,t)
    print(num)

Solution (Python):
def upper(word):
    Word = ''
    str = list(word)
    for i in range(len(str)):
        if str[i].islower(): Word += str[i].upper()
        else: Word += str[i]
    return Word

key_word = str(upper(input()))
sen = []
count = 0
while True:
    a = str(input())
    if a == 'END_OF_TEXT': break
    a = upper(a)
    sen.extend(a.split())
for i in range(len(sen)):
    if sen[i] == key_word:
        count+= 1
print(count)

Solution (Python):



W = input()
sents = []
while True:
    sent = input()
    if sent == 'END_OF_TEXT' :break
    sents.append(sent.lower())

word_ct = 0
for sent in sents:
    for word in sent.split(' '):
        word = word.strip('\.\,\:\"\'')
        if word == W:
            word_ct += 1

print(word_ct)

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

Solution (Python):
w=input()
a=0
while True:
    t=input().split()
    l=[]
    for T in t:
        l.append(T.lower())
    a+=l.count(w)
    if t[0]=="END_OF_TEXT":
        break

print(a)

Solution (Python):
W = input().lower()
ans = 0
while True:
    s = input()

    if s == "END_OF_TEXT":
        break

    s = s.lower().split()

    ans += s.count(W)

print(ans)

Solution (Python):
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s.lower().split():
        if w == w0:
            c += 1
print c

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):
target = input()
result = 0
while True:
    sen = input()
    if sen == "END_OF_TEXT": break
    result += [i.lower() for i in sen.split()].count(target)
print(result)

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

Solution (Python):
import fileinput
W = input()
cnt = 0
for T in fileinput.input():
    if T.rstrip() =='END_OF_TEXT':
        break

    T = T.lower().split()
    cnt += T.count(W)
    
print(cnt)

Solution (Python):


def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a



def main():
    W = input().upper()  
    line = ""
    count = 0
    while True:
        line = input().split(" ")
        if line[0] == "END_OF_TEXT": break
        for i in range(len(line)):
            word = line[i].upper()
            if W == word: count += 1
    print(count)

if __name__ == "__main__":
    main()

Solution (Python):




def main():
    W = input().upper()  
    line = ""
    count = 0
    while True:
        line = input().split(" ")
        if line[0] == "END_OF_TEXT": break
        for i in range(len(line)):
            word = line[i].upper()
            if W == word: count += 1
    print(count)

if __name__ == "__main__":
    main()

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

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

Solution (Python):
import fileinput

cnt = 0
W = input()
for line in fileinput.input():
    if line.rstrip() == "END_OF_TEXT":
        break

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

print(cnt)

Solution (Python):
w = str(input()).lower()
ans = 0

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

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

print(ans)

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

Solution (Python):
W = input()
lis = []
cot = 0
while True:
    x = input().split()
    if x == ["END_OF_TEXT"]:
        break
    lis += x
for y in lis:
    if y.lower() == W:
        cot += 1
print(str(cot))

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

Solution (Python):

import re

word = input()
text = ""

end = 0
while end == 0:
    input_line = input()
    if input_line == 'END_OF_TEXT':
        end += 1
    else:
        text += input_line
        text += " "

blocked = text.lower().split() 
count = 0
for a in blocked:
    if a == word:
        count += 1
print(count)

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

t = []
while 1 :
    _t = input().strip().split(" ")
    if "END_OF_TEXT" in _t :
        break
    t.extend(_t)

print( sum([ i.lower()==w for i in t ] ) )

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

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

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

while True:
    T = raw_input()
    if T == "END_OF_TEXT":
        break
    Ti = T.lower().split()
    for i in Ti:
        if i == W:
            c += 1

print("%d" % (c, ))

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

Solution (Python):
import sys

p = 0
s = 0
for line in sys.stdin:
    ls = line.strip('\n')
    if ls == 'END_OF_TEXT': break
    ls = ls.lower()
    if p == 0:
        w = ls
        p = 1
    else:
        for word in ls.split():
            if word == w: s += 1
print s

Solution (Python):
import sys

p = 0
s = 0
for line in sys.stdin:
    ls = line.strip('\n')
    if ls == 'END_OF_TEXT': break
    ls = ls.lower()
    if p == 0:
        w = ls
        p = 1
    else:
        for word in ls.split():
            if word == w: s += 1
print s

Solution (Python):
w0 = raw_input().lower()
c = 0
while True:
    s = raw_input()
    if s == 'END_OF_TEXT': break
    for w in s.lower().split():
        if w == w0:
            c += 1
print c

Solution (Python):
W=raw_input()
T=[]
while 1:
    x=raw_input()
    if x=="END_OF_TEXT": break
    T+=[v.lower() for v in x.split()]
print T.count(W)

Solution (Python):
w=raw_input().lower()
c=0
while 1:
        t=map(str,raw_input().split())
        if t[0]=="END_OF_TEXT":
                break
        for i in range(len(t)):
                if t[i].lower()==w:
                        c+=1
print c

Solution (Python):
from __future__ import division, print_function
from sys import stdin
word = stdin.readline().rstrip().lower()
cnt = 0
for line in stdin:
    if line.startswith('END_OF_TEXT'):
        break
    cnt += line.lower().split().count(word)
print(cnt)

Solution (Python):
ans=[]
W=raw_input()
while True:
    i = raw_input()
    if i == 'END_OF_TEXT': break
    ans+=[j.lower() for j in i.split()]
print ans.count(W)

Solution (Python):
import sys
w = raw_input()
n = 0
for t in sys.stdin.read().split():
	if t == 'END_OF_TEXT':
		break
	if t.lower() == w.lower():
		n += 1
print n

Solution (Python):
import sys
w = raw_input()
n = 0
for t in sys.stdin.read().split():
    if t == 'END_OF_TEXT':
        break
    if t.lower() == w.lower():
        n += 1
print n

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

Solution (Python):
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t[0] == "END_OF_TEXT":
        break
    else:
        for ti in t:
            if ti.lower() == w:
                sum += 1
print sum

Solution (Python):
W = raw_input().upper()
T = []
while True:
	txt = raw_input()
	if txt == "END_OF_TEXT":
		break
	T += txt.upper().split()
print T.count(W)

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

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

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

Solution (Python):
w=input().lower()
list=[]
while True:
    s=input()
    if s=="END_OF_TEXT":
        break
    c=s.lower().split().count(w)
    list.append(c)
print(sum(list))

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
kaito = int(0)
line = []
sagasu = str(input().upper())

while True:
    sonogyo = str(input())
    if sonogyo == "END_OF_TEXT":
        break
    line += sonogyo.upper().split( )
for a in line:
    if a == sagasu:
        kaito = kaito + 1
print(int(kaito))

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

T=list(T.lower().split())
cnt=0
for word in T:
    if word==W:
        cnt+=1
print(cnt)

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

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

Solution (Python):
k=0
n=input()
n=n.lower()
s=input()
while s!='END_OF_TEXT':
    s=s.lower()
    S=s.split()
    
    for i in range(len(S)):
        if n==S[i]:
            k+=1
    s=input()
print(k)

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

Solution (Python):
A=0
W=str(input())

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

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

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):
W=input()
num=0
while True:
    T=input()
    t=str.lower(T)
    if (T == 'END_OF_TEXT'):break
    t_split=(t.split())
    for i in range(len(t_split)):
        if t_split[i] == W:
            num+=1

print(num)

Solution (Python):
W=input()
sentences=''
while True:
    try:
        sentence=input()
        sentences+=sentence
        if sentence=='END_OF_TEXT':
            break
        sentences+='\n'
    except EOFError:
        pass
answer_count=0
for l in sentences.split():
    if l.lower()==W:
        answer_count+=1
print(answer_count)

Solution (Python):
from sys import stdin
w = str(input()).lower()
t = stdin.read().split()
counter = 0
for i in t:
	i = i.lower()
	if i == w:
		counter += 1
print(counter)

Solution (Python):
import sys

w=input()

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

Solution (Python):
a = []
text = input()
while True:
    b = input()
    if b == "END_OF_TEXT":
        break
    a += b.lower().split()
    
print(a.count(text))

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

Solution (Python):
w=input().lower()
list=[]
while True:
    s=input()
    if s=="END_OF_TEXT":
        break
    c=s.lower().split().count(w)
    list.append(c)
print(sum(list))

Solution (Python):
x = input().casefold()
count = 0
while True:
    y = input()
    if y == "END_OF_TEXT":
        break
    y = y.casefold()
    z = y.split()
    count += z.count(x)
    
print(count)

Solution (Python):
w=str(input())
t=list(input().split())
while True:
    try:
        a=str(input())
        if a!=("END_OF_TEXT"):
            a=a.split()
            t=a+t
    except EOFError:
        break
count=0
for i in range(len(t)):
    t[i]=t[i].lower()
    if t[i]==w:
        count +=1
print(count)

Solution (Python):
w=input()
list=[]
c=0
while True:
    t=input()
    if t=='END_OF_TEXT':
        break
    else:
        t=t.lower()
        
        list=t.split()
        
        for i in range(len(list)):
            if list[i]==w:
                c=c+1
print(c)

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

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

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

while True:
  
  text = input()

  if text == "END_OF_TEXT":
    break
  cnt += text.lower().split().count(W)

print(cnt)

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

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

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

ans = 0

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

print(ans)

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

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

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 sys
W = input()
word = []
counter = 0
while 1:
    line = input()
    
    if line == "END_OF_TEXT" :
        for i in  word:
            counter += i.count( W )
        print(counter)
        sys.exit()
    line = line .lower()
    word.append( line.split() )

Solution (Python):

W=str(input())
w=str.upper(W)
c=[]
while True:
    T=str(input())
    t=str.upper(T)
    s=t.split()
    if T==('END_OF_TEXT'):
        break
    a=s.count(w)
    c.append(a)
print(sum(c))

Solution (Python):
A=0
W=str(input())

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

Solution (Python):
import sys

w=input()

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

Solution (Python):
W = input()
number = 0
while True:
    s = input()
    if s == "END_OF_TEXT":
        break
    for ss in list(s.split()):
        if ss.lower() == W:
            number += 1

print(number)

Solution (Python):




def main():
    W = input().lower()
    T = []
    while True:
        t = input()
        if t == "END_OF_TEXT":
            break
        T += list(t.lower().split())

    ret = 0
    for i in range(len(T)):
        if T[i] == W:
            ret += 1
    print(ret)


if __name__ == '__main__':
    main()

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

Solution (Python):
A=0
W=str(input())

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

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

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

Solution (Python):


W=input()
c=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:
                c+=1
print(c)

Solution (Python):
w = input().upper()
ans = 0
while True:
    line = input()
    if line == 'END_OF_TEXT':
        break
    for word in line.upper().split():
        if word == w:
            ans += 1
print(ans)

Solution (Python):
w=input()
w2=w.lower()
y=0
while True:
    x=input()
    z=x.lower()
    s="END_OF_TEXT"
    if x == s:
        break
    m = z.split()
    a = m.count(w2)
    y += a
print(y)

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

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

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

print(k)

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

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

print(ans)

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

Solution (Python):
x=input()
l=0
while True:
    k=input()
    if k==('END_OF_TEXT'):
        break
    k1=k.lower()
    a=k1.split()
    l+=(a.count(x))
print(l)

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

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

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):
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):
my_list=[]
count=0
w=input()
w=w.lower()
while(True):
    var=input()
    if(var=="END_OF_TEXT"):
        break
    else:
        var=var.split()
        my_list+=var
for t in my_list:
    t=t.lower()
    if(w == t):
        count+=1
    else:
        None
print(count)

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

while True:
    tmp = input()
    T = tmp.lower().split()

    for i in T :
        if (i == W):
            Wcount += 1

        else :
            continue

    

    if(tmp == "END_OF_TEXT"):
        break

print(Wcount)

Solution (Python):
list1 = 0
key = input().lower()

while True:
    strings = input()
    if strings == "END_OF_TEXT": break
    list1 += strings.lower().split(" ").count(key)
print(list1)

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

s=0
while True:
    a= input()
    if a=='END_OF_TEXT' : break
    
    a=a.casefold()
    aa=a.split()
    s+= aa.count(word)
    
print(s)

Solution (Python):
import sys 
import collections as co
S=input()
ans=0
N=sys.stdin.read()
P=N.lower().split()
print(P.count(S))

Solution (Python):
w = input()

t = []
while True:
    buf = input().split()
    if buf[-1] == "END_OF_TEXT":
        break
    t += [x.lower() for x in buf]

print(t.count(w))

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):
w=input()
w=w.upper()
word=[]
count=0
while True:
  t=input()
  if t=="END_OF_TEXT":
    break
  word=t.split()
  for buff in word:
    buff=buff.upper()
    if buff==w:
      count+=1

print(count)