import os
import sys
#os.chdir('/Users/yihan/Desktop/workplace/Cours/PE2')
list_p=['!',',','.','?',':',';','»','«','\'','\"',' ']
chemin= str(sys.argv[1])
with open(sys.argv[1],'r', encoding='UTF-8') as f:
    c=f.read()
    for p in list_p:
        c=c.replace(p,',')
c=c.lower()
li=c.split(',')
dico={}
mot=input("veuillez entrer un mot pour effectuer la recherche: ")
for ph in li:
    if mot in ph:
        if mot not in dico:
            dico[mot]=1
        else:
            dico[mot]+=1    
print(dico[mot])