# Programmer: Sriram Pemmaraju
# Date: Feb 17th, 2011
# Computes the number of near integers in a given sequence of numbers

import math
n = int(raw_input("Enter the positive integer that denotes the length of your sequence: "))

counter = 0 # tracks the number of numbers processed
numNearIntegers = 0 # tracks the number of near integers discovered so far

# Loop for processing the numbers
while counter < n:
    currentNumber = float(raw_input())

    # Find the two integers that currentNumber is sandwiched between
    smallerInt = math.floor(currentNumber)
    largerInt = math.ceil(currentNumber)
    
    # Determine is currentInt is very close to either integer
    if (currentNumber - smallerInt <= 0.001) or (largerInt - currentNumber <= 0.001):
        numNearIntegers = numNearIntegers + 1
    
    counter = counter + 1

print "The number of near integers is", numNearIntegers