P8611 [Lanqiao Cup 2014 NOI Qualifier AB] Ant Flu

Description

There are $n$ ants on a thin straight rod of length $100$ cm. Some ants are facing left, and some are facing right. Each ant can only crawl forward along the rod at a speed of $1$ cm/s. When two ants meet, they will both turn around and crawl in the opposite directions. Among these ants, one ant has caught a flu. When it meets other ants, it will infect the ant it touches. Please compute how many ants will have the flu when all ants have crawled off the rod.

Input Format

The first line contains an integer $n(1

Output Format

Output one integer, representing the final number of ants that have the flu.

Explanation/Hint

Translated by ChatGPT 5