All problems

Whole Numbers Only

easyPythonNumPyData Types

The turnstiles at the Fenwick College theatre report their head counts through a field that was set up years ago to hold decimals, so a gate that admitted four people files 4.0 — and, when the sensor stutters, something like 4.9. Finance will only book whole tickets. House policy is firm about when the fraction goes: each gate's figure is cut back to a whole number on its own, before any gate is added to any other. A part-person is never a ticket, however close to one it looks.

Task: Print the total number of whole tickets across all the gates.

Input

The first line holds a single integer n, the number of gates. Each of the next n lines holds one gate's count: a decimal number, never negative.

Output

One line holding the total as a whole number, with no decimal point.

Example:

Input:
3
4.9
2.1
3.7

Output:
9

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…