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

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):
searching_word = input()
sentence = []
counter = 0
try:
  while True:
    words = input().lower().split()
    if words == 'end_of_text':
      break
    for i in range(len(words)):
      sentence.append(words[i])
except EOFError:
  pass

for i in range(len(sentence)):
  if sentence[i] == searching_word:
    counter += 1
print(counter)

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):
import sys
import os


word = input().strip().lower()
c = 0
for s in sys.stdin:
    s = s.lower()
    for separated in s.split():
        if word == separated:
            c += 1
print(c)

Solution (Python):
W = input().lower()
cnt = 0
while True:
    A = input()
    if A == "END_OF_TEXT":
        break
    cnt += A.lower().split().count(W)
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):
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, count = input(), 0

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

print(count)

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):
a=input()
a=a.lower()
d=""
for i in range(1000):
    B=input()
    if B == "END_OF_TEXT":
        break
    B=B.lower()
    d=d+" "+B
    dd=d.split()
c=dd.count(a)
print(c)

Solution (Python):
w=str(input()).upper()
v=[]
while True:
    t=str(input())
    if t == "END_OF_TEXT":
        break
    v+=t.upper().split()
s=0
for i in v:
    if i == w:
        s+=1
print("%d"%(s))

Solution (Python):
t=str(input()).upper()
line=[]
con=0

while True:
    tmp_line=str(input())
    if tmp_line=='END_OF_TEXT':
        break
    line+=tmp_line.upper().split()
    
for tmp_word in line:
    if tmp_word==t:
        con+=1
        
print(con)

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()
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):
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()
S = []
while True:
    s = list(map(str, input().split()))
    if s[0] == 'END_OF_TEXT':
        break
    S += s
for i in range(len(S)):
    S[i] = S[i].lower()
print(S.count(W))

Solution (Python):
a=input().lower()
b=[]
ans=0
while True:
    tmp=input()
    if tmp=="END_OF_TEXT":
        break
    b.append(tmp.lower().split(" "))
for i in b:
    for j in i:
        if j == a:
            ans+=1
print(ans)

Solution (Python):
word = input()

sents = ""

while True:
    sent = input()
    if sent == "END_OF_TEXT":
        break
    sents = sents + " " + sent

words = list(map(str, sents.split()))
counts = 0

for w in words:
    w = w.lower()
    if w[len(w) - 1] == ".":
        w = w[:-1]
    if w == word:
        counts += 1

print(counts)

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

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):
word = input().lower()
cnt = 0
while True:
	eot = input()
	if eot == 'END_OF_TEXT':
		break
	sent = eot.lower().split()
	if word in sent:
		cnt += sent.count(word)
print(cnt)

Solution (Python):



w = str(input())
y = 0

while True:
    T = str(input())
    if T == "END_OF_TEXT":
        break
    t = T.lower().split()
    x = t.count(w)
    y = y + x
print(y)

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

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

ans=0

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

print(ans)

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

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

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()
t=input()

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

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

Solution (Python):
n=input()
a=0
while True:
    s=input()
    if s == 'END_OF_TEXT':
        print(a)
        break
    else:
        x = s.lower()
        l = x.split()    
        b = l.count(n)
        a+=b

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

print(co)

Solution (Python):
w=str(input()).upper()
bun=[]
while True: 
    a=str(input())
    if 'END_OF_TEXT'==a:
        break
    bun+=a.upper().split()
count=0
for i in bun:
    if i==w:
        count+=1
print(count)

Solution (Python):
W = input()
w = W.upper()
y=0
while True:
    T = input()
    t = T.upper().split()
    if T=='END_OF_TEXT':
        break
    elif w in t:
        y += t.count(w)
    else:
        pass
print(y)

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

Solution (Python):
w = input().upper()
t = ""
while True:
    tmp = input()
    if tmp == "END_OF_TEXT":
        break
    t += tmp.upper() + " "
list = t.split()
print(list.count(w))

Solution (Python):
A=0

B=str(input())

while True:
    C=str(input())
    
    if C=='END_OF_TEXT':
        break
    else:
        D=C.lower().split()
        E=(D.count(B))
        A+=E
        
print(A)

Solution (Python):
a=input()
b=[]
total=0
while True:
    c=input().strip(".").split()
    if c==["END_OF_TEXT"]:
        break
    else:
        b.append(c)
for i in range(len(b)):
    for j in b[i]:
        if a==j.lower():
            total+=1
print(total)

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

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

Solution (Python):
pattern = input()
text = []
while True:
    tmp = input().split()
    if tmp[0] == "END_OF_TEXT":
        break
    text[len(text):len(text)] = tmp

count = 0
marks = "!\"
for i in range(len(text)):
    
    trim = text[i].lower()
    for mark in marks:
        trim = trim.replace(mark, "")
    word = trim
    
    if word == pattern:
        count += 1
    
print(count)

Solution (Python):
target_word = input()

BREAK_CLAUSE = "END_OF_TEXT"
total_occurrences = 0

while True:
    text = input()
    
    if text == BREAK_CLAUSE:
        print(total_occurrences)
        break 
    
    text = text.split(" ")
    cleaned_text = [word.lower() for word in text]
    
    total_occurrences += cleaned_text.count(target_word)

Solution (Python):
s=input()
sm=0
while 1:
    text=input().split()
    if text==["END_OF_TEXT"] : break
    sm+=len([x for x in text if x.lower()==s])

print(sm)

Solution (Python):
W, *T = open(0).read().split()
ans = len([t for t in T if t.lower() == W.lower()])
print(ans)

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

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

Solution (Python):
W=input()
W1=W.upper()
lst=[]
while True:
    T=input()
    if T=='END_OF_TEXT':
        break
    a=T.upper()
    b=a.split()
    lst.append(b.count(W1))
print(sum(lst))

Solution (Python):



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

Solution (Python):
w = input().upper()
flg = True
count = 0

while flg:
    string = input().split()
    
    
    if "END_OF_TEXT" in string:
        flg = False

    for i in range(len(string)):
        if w == string[i].upper():
            count += 1
        
        
print(count)

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

Solution (Python):
a = str(input())
f = a.lower()
b = []
while True:
    n = input()
    e = n.lower()
    c = (e.split(' '))
    if n == "END_OF_TEXT":
        break
    b.append(c)

d = []
for l in b:
    for item in l:
        d.append(item)

print(d.count(f))

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

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

Solution (Python):
W = input().replace("\r", "").replace("\n", "")
strings = []
while True:
    s = input().replace("\r", "").replace("\n", "")
    if s == "END_OF_TEXT":
        break

    for i in list(s.lower().split()):
        strings.append(i)

print(strings.count(W))

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

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

Solution (Python):
import sys


def resolve():
    w = input()

    count = 0
    for line in sys.stdin:
        if line == "END_OF_TEXT\n":
            break

        words = map(lambda x: x.lower(), line.split())
        for word in words:
            if word == w:
                count += 1
    print(count)


resolve()

Solution (Python):
import sys

W = input()

T = sys.stdin.read()




T_word = T.split()


count = 0
for s in T_word:
    if s == "END_OF_TEXT":
        break
    
    target = s.lower()

    
    if target == W:
        count += 1

print(count)

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

print(ans)

Solution (Python):
W=str(input())
Sw=list(W)
Sw.append(" ")
Sw.insert(0," ")
Lw=list(W.upper())
Lw.append(" ")
Lw.insert(0," ")
x=0
while True:
    T=str(input())
    if T=='END_OF_TEXT':
        break
    elif T.find(Sw[1])==-1 and T.find(Lw[1])==-1:
        pass
    else:
        t=list(T)
        t.append(" ")
        t.insert(0," ")
        for i in range(len(t)):
            if t[i]==Sw[0] or t[i]==Lw[0]:
                if i+len(Sw)>len(t):
                    break
                else:
                    for j in range(len(Sw)):
                        y=0
                        if t[i+j]!=Sw[j] and t[i+j]!=Lw[j]:
                            break
                        else:
                            y+=1
                    x+=y
print(x)

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

while True:
    t = input().split()
    if "END_OF_TEXT" in t:
        break
    count += list(map(str.lower, t)).count(w)

print(count)

Solution (Python):
l = []

str = input()
while True:
    txt = input()
    if txt == 'END_OF_TEXT':
        break
    x = txt.lower()
    X = x.split() 
    l += X 

print(l.count(str))

Solution (Python):
w = input()
lst=[]
while True:
    t_r = input()
    if t_r == 'END_OF_TEXT':
        break
    else:
        t_r = t_r.strip(',.\"\'')
        t_r = t_r.lower()
        lst.append(list(map(str, t_r.split())))
count = 0
for i in range(len(lst)):
    for v in lst[i]:
        if v == w:
            count += 1
print(count)

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

print(count)

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

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

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

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

Solution (Python):


W = input().upper()

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

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

Solution (Python):


def main():
    find_word=input()
    text=[]
    counter=0
    while True:
        text=input()
        if text =="END_OF_TEXT":
            break
        text=text.lower()
        for string in text.split():
            if string==find_word:
                counter+=1
    print(counter)

if __name__=="__main__":
    main()

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


S = input().strip()
words = []

while True:
    line = input().strip()
    if line == "END_OF_TEXT":
        break
    w = [word.lower() for word in line.split()]
    words += w

ans = 0

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

print(ans)

Solution (Python):
T = input()
cnt = 0
while True:

    try:
        cnt += input().lower().split().count(T)
    except:
        break
print(cnt)

Solution (Python):

w = input()
t = []
count = 0

while True:
    t.extend(input().split())
    if t[len(t) - 1] == "END_OF_TEXT":
        break

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

print(count)

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

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

Solution (Python):
i,cou=0,0
sent=[]
word=input()

while True:
    for w in input().split():
        sent.append(w.lower())
        check = w
    if check == "END_OF_TEXT":
        break



print(sent.count(word))

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

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):
import sys

w = input()
p = sys.stdin
count = 0

for line in p:
    x = line.lower().split().count(w)
    count += x
print(count)

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):
x=0
w=input()
while True:
    y=[]
    t=list(input().split())
    
    
    if t[0]=='END_OF_TEXT':
        break
    
    
    
    for i in range(len(t)):
        y.append(t[i].lower())
    
    
    for j in range(len(t)):
        if y[j]==w:
            x+=1
print(x)

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()

count = 0
while True:
    input_str = input()
    if input_str == "END_OF_TEXT":
        break
    S = [s.lower() for s in input_str.split(" ")]
    count += S.count(W)

print(count)

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().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()
W = w.upper()
d = []
while True:
    t = input()
    if t == 'END_OF_TEXT':
        break
    n = t.upper()
    a = n.split()
    d += a
c = d.count(W)
print(c)

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

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

while True:
    strs = input()
    if strs == 'END_OF_TEXT':
        break
    count += strs.upper().split().count(check)

print(count)

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


counter = 0
while True:
    list_s = [str(_) for _ in input().split(" ")]
    
    if "END_OF_TEXT" in list_s:
        break
    
    for s in list_s:
        
        if s.lower() == word:
            counter += 1
            
            
    
print(counter)

Solution (Python):
l = []
res = 0
w = input()
while True:
    temp = input()
    if temp[-1] == '.':
        temp = temp[:-1]
    if temp =='END_OF_TEXT':
        break
    l.append(temp.split())
for i in l:
    for j in i:
        if w == j.lower():
            res += 1
print(res)

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

Solution (Python):
W=str.lower(input())
a=len(W)
if a<=10:
    sum=0

    while True:
        T=input()
        if T=="END_OF_TEXT":
            break
        if len(T)<=1000:
            T=str.lower(T)
            T=T.split()
            x=T.count(W)
            sum+=x
print(sum)

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):
search = input()

t = []
while(True):
  line = input()
  if (line == "END_OF_TEXT") :
    break
  
  line = [l for l in line.split()]
  
  for l in line:
    t.append(l.lower())

count = 0
for i in t:
  if (i == search):
    count += 1
    
print(count)

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

Solution (Python):
s=input()
sum=0
while True:
    try:
        l=input().split()
        if l=="END_OF_TEXT" :break
        for i in range(len(l)):
            l[i]=l[i].lower()
            if s==l[i] : sum+=1
    except EOFError : break
print(sum)

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()
string = []
while True:
  try:
    str_list = (input().lower()).split()
    for i in str_list:
      string.append(i)
  except EOFError:
    break
print(string.count(w))

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

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

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

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

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

Solution (Python):
w = input()
T = []
c = 0
while True:
    t = input()
    if t == "END_OF_TEXT":
        break
    T.append(t.split())

for t in T:
    for i in t:
        if i.lower() == w:
            c += 1
print(c)

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

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

Solution (Python):


x=0
n=str(input())
l=n.lower()
m=n.upper()
o=list(l)
S=[]
p=list(m)
T=[]
for i in range (len(o)):
    o[i]=o[i].upper()
    o[i-1]=o[i-1].lower()
    s = ''.join(o)
    S.append(s)
for j in range (len(o)):
    p[j]=p[j].lower()
    p[j-1]=p[j-1].upper()
    t=''.join(p)
    T.append(t)
while True:
    try:
        a=list(input().split())
        x+=a.count(l)
        x+=a.count(m)
        if len(S)>=2:
            for b in range (len(S)):
                x+=a.count(S[b])
        if len(T)>=2:
            for c in range (len(T)):
                x+=a.count(T[c])


    except:
        break;
print(x)

Solution (Python):
W = input().lower()
words = []
while True:
    sentence = input()
    if sentence == 'END_OF_TEXT':
        break
    else:
        words += sentence.lower().split()
print(words.count(W))

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

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

Solution (Python):
import sys
N = input()
N = N.upper()
count = 0
while True:
  S = sys.stdin.readline().split()
  if S[0] == "END_OF_TEXT":
    break
  else:
    S = list(map(str.upper,S))
    count += S.count(N)
print(count)

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

print(ans)

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

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

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

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

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()
t = ""
for l in sys.stdin:
    if l == "END_OF_TEXT\n":
        break
    t += str(l).lower()

arrt = t.replace("\n", " ").split(" ")
print(arrt.count(w))

Solution (Python):
W=input()
w=W.lower()
n=0

while True:
    t=input()
    
    if t=="END_OF_TEXT":
        break
    
    tl=t.lower()
    tls=tl.split()
    n+=tls.count(w)
    
print(n)

Solution (Python):
import sys

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

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

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

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

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


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

    for word in T:
        if word == W:
            count += 1

print(count)

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

Solution (Python):
n = input().upper()
a = 0
b = []
while True:
    text = input()
    if text == 'END_OF_TEXT':
        break
    c = text.upper().split()
    for i in c:
        if n == i:
            a += 1
print(a)

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

Solution (Python):
t=str(input()).upper()
line=[]
con=0

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

for tmp_word in line:
    if tmp_word==t:
        con+=1

print(con)

Solution (Python):

from sys import stdin

W = stdin.readline().rstrip()

sum = 0
while True:
  T = stdin.readline().rstrip()
  if T == 'END_OF_TEXT':
    break
  T = T.split()
  sum += len([s for s in T if s.lower() == W])
print(sum)

Solution (Python):
t = str(input()).lower()
n = 0
while True:
    w = list(map(str,input().split()))
    if w[0] == 'END_OF_TEXT':
             break
    w = list(map(str.lower,w))
    n += w.count(t)
print(n)

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    text = ""
    word = input().rstrip().lower()
    count = 0
    while True:
        s = input().rstrip()
        if s == "END_OF_TEXT":
            break
        s = s.lower().split()
        count += s.count(word)
    
    print(count)
    
if __name__ == "__main__":
    main()

Solution (Python):
def run():
    query=input()
    
    text_list=[]
    
    while True:
        line=input()
        
        if line=="END_OF_TEXT":
            break
        
        text_list.append(line)
        
    n=0
    for text in text_list:
        word_list=text.split()
        for w in word_list:
            
            if w.lower() == query:
                n+=1
            
    print(n)

run()

Solution (Python):
import sys

W = input().upper()
T = sys.stdin.readlines()

result = 0

for line in T:
    line = line.upper()
    if line == "END_OF_TEXT":
        break

    words = line.split()

    for word in words:
        if word == W:
            result += 1

print(result)

Solution (Python):
W=input()
s=0
try:
    while True:
        T=list(input().split())
        l=len(T)
        for i in range(l):
            if T[i]=="END_OF_TEXT":
                break
            else:
                t=T[i].lower()
                if t==W:
                    s+=1
                
except EOFError:
    pass
print(s)

Solution (Python):
word=input().lower()
sent=[]
while True:
	tmp=input()
	
	if ("END_OF_TEXT" in tmp) ==True:
		break
	tmp=tmp.split(' ')
	sent.append(tmp)
	

sent=sum(sent,[])
sent= list(map(lambda x:x.lower(),sent))

c=sent.count(word)

print(c)

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

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

print(count)

Solution (Python):
W = input()

T = ""

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

Tl = T.split()

print(Tl.count(W))

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

Solution (Python):
target=str(input())
cnt=0
while True:
    T=str(input())
    if T=='END_OF_TEXT':
        break
    count=0

    for i in T.lower().split():
        if i==target:
            cnt+=1

print(cnt)

Solution (Python):
W = input()
W = W.lower()
ans = 0
for i in range(10**5):
    S = input()
    if S == "END_OF_TEXT":
        break
    else:
        T = S.lower()
        T = T.split()
        ans += T.count(W)
print(ans)

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

cnt = 0

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

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

print(cnt)

Solution (Python):
W = input()
S = []
while True:
    S_tmp = input()
    if S_tmp == 'END_OF_TEXT': break
    S += S_tmp.lower().replace('.', ' .').split(' ')

ans = 0
for s in S:
    if W==s:
        ans += 1
    
print(ans)

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

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

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

Solution (Python):

W = input()

S = ''
while True:
    a = input()
    if a == 'END_OF_TEXT':
        break
    S += a.lower() + ' '

S = S.split()

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