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 Ti separated by space characters and newlines. Count the number of Ti 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



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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
count = 0
W = input().lower()
T = ""
while True:
    try:
        if T[0] == "END_OF_TEXT":
            break
        for t in T:
            if W == t:
                count += 1 
        T = [x.lower() for x in input().split()]
    except EOFError:
        break
print(count)

Submission status: Runtime Error

Solution code:
count = 0
W = input().lower()
T = [0]
while True:
    try:
        if T[0] == "END_OF_TEXT":
            break
        for t in T:
            if W == t:
                count += 1
        T = [x.lower() for x in input().split()]
    except EOFError:
        break
print(count)

Submission status: Runtime Error

Solution code:
w = input()

i = 0

while True:
	t = input()
	if t == "END_OF_TEXT" or not t:
		break
	if w in t:
		i += 1

print(i if i != 0)

Submission status: Runtime Error

Solution code:
search_s = input()
cnt = 0
while True:
    word_list = input().lower().split()
    if word_list[0] == "END_OF_TEXT" : break
    for word in word_list:
        if word == search_s:cnt += 1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
word = input()

string = input().lower()
last = ""

while last != "END_OF_TEXT":
	last = input().lower()
	string += last
	
print(string.count(word))

Submission status: Runtime Error

Solution code:
c=0
s=''
p=input().upper()
while True:
    s1=input()
    if s1 =='END_OF_TEXT':
        break
     s+=s1
a=s.upper().split()
for i in a:
    if p in i:
       c+=1
print(c)

Submission status: Runtime Error

Solution code:
word=input()
how_in=0
while True:
    try:
        statement=input()
    except:
        break
    if statement=='END_OF_TEXT':
        break
    statement=statement.lower()
    statement.remove(' ')
    if word in statement :
        how_in+=statement.count(word)

print(how_in)

Submission status: Runtime Error

Solution code:
word=input().lower()
how_int=0
while True:
    letters=input()
    if letters=='END_OF_TEXT':
        break
    for i in letters.lower().split():
        if i==word:
            how_in+=1
print(how_in)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
word = string(input())
texts = list(string, input().split())

ans = texts.count(word)

print ans

Submission status: Runtime Error

Solution code:
word = string(input().lower())
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  str = str.lower()
  texts.extends([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Submission status: Runtime Error

Solution code:
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  str = str.lower()
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Submission status: Runtime Error

Solution code:
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print ans

Submission status: Runtime Error

Solution code:
word = input().lower()
texts = []
while TRUE:
  str = input()
  if str == 'END_OF_TEXT':
    break
  texts.extend([s.lower() for s in str.split()] )
    

ans = texts.count(word)

print(ans)

Submission status: Runtime Error

Solution code:
W = input()
print(((sys.stdin.read()).lower()).count(W))

Submission status: Runtime Error

Solution code:
word = raw_input()
counter = 0
while True:
    line = raw_input()
    if line == "end_of_text":
        break
    counter += line.lower().split(" ").count(word)

print counter

Submission status: Runtime Error

Solution code:
tt=input()
a=''
while True:
    text=input().upper
    if text=='END_OF_TEXT':
        break
    a+=text
print(a.count(tt))

Submission status: Runtime Error

Solution code:
import sys
print(sys.stdin.read().split().count(input()))

Submission status: Runtime Error

Solution code:
W=input()
T=''
while 1:
 a=input()
 if'END_OF_TEXT'!=a:T+=a'
 else:break
 T+=' '
print(T.count(W))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
while 1:
 s=input()
 if'-'==s:break
 n=sum([int(input())for _ in range(int(input()))])%len(s)
 print(s[n:]+s[:n])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding:utf-8
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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
w = input()
print(sys.stdin.read().lower().split().cout(w))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
w = input()
cnt = 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:
            cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
import sys

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

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

print(num,end='')

Submission status: Runtime Error

Solution code:
string=[]
W = input()#単語入力
while True:
    T = input()#入力
    if T == '':#EOT入力のときループぬける
        break
    string.append(T)#list追加
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

import sys

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

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

    if 'END_OF_TEXT' in t:
        break

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

print(count)

Submission status: Runtime Error

Solution code:
# AOJ ITP1_9_A

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
w = raw_input()

sum = 0
while True:
    t = raw_input()
    if t == "END_OF_TEXT":
        break
    elif t == w
        sum += 1

print sum

Submission status: Runtime Error

Solution code:
w = raw_input().lower
sum = 0
while True:
    t = raw_input().lower
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.count(w)
print sum

Submission status: Runtime Error

Solution code:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().lower()
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.count(w)
print sum

Submission status: Runtime Error

Solution code:
w = raw_input().lower()
sum = 0
while True:
    t = map(str, raw_input().split())
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.lower().count(w)
print sum

Submission status: Runtime Error

Solution code:
w = raw_input().lower()
sum = 0
while True:
    t = raw_input().split()
    if t == "END_OF_TEXT":
        break
    else:
        sum += t.lower().count(w)
print sum

Submission status: Runtime Error

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

Submission status: WA: Presentation Error

Solution code:
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,end='')