#!/usr/bin/env python

"""
Counts sequences.

Input: a file with sequences, separated by one or more blank lines.

Output: the number of sequences.
"""

import sys

inseq = False
count = 0

for line in sys.stdin:
    if inseq:
        if not line.rstrip():
            inseq = False
    else:
        if line.rstrip():
            count += 1
            inseq = True

print count
