220. Sentence Count

I'm a slow walker, but I never walk backwards.

Task Description

寫一個程式計算輸入文章中的句子數。為求簡單起見我們假設一個句子的結束必定為一個句點。但是為了避免像 "Mr." "i.e." 這樣的問題,我們規定符合下面四種狀況之一才算是一個句子 :

  • 句點後面必須有兩個連續空白 ' '
  • 句點後面就是換行 '\n'
  • 句點後面就是 EOF '\0'
  • 句點到 EOF 之前只有空白或換行

Sample Input

The Declaration of Independence was a
statement adopted by the Continental Congress
on July 4, 1776, which announced that the
thirteen American colonies then at war with
Great Britain regarded themselves as independent
states, and no longer a part of the British
Empire.  Written primarily by Mr. Thomas Jefferson
the Declaration was a formal explanation of why
Congress had voted on July 2 to declare
independence from Great Britain, more than a
year after the outbreak of the American
Revolutionary War.  The birthday of the United
States of America-Independence Day-is celebrated
on July 4, i.e., the day the wording of the
Declaration war approved by Congress.

Sample Output