# -*- coding: utf-8 -*-
"""
Created on Tue Sep 29 12:30:10 2020

@author: Sim
"""
# wordcount11.py

f = open("D:/htex/pythonbk/codesdata/대한민국헌법.txt", "r", encoding='utf-8')
texts = f.readlines()
f.close()

allwords = ""

for line in texts:
    allwords = allwords + line.strip() 

counter = allwords.count("대통령")
print (counter)

