4007 - SK

Created by V Copa UPR - Elio Alejandro Govea Aguilar
Added by eliogovea (2018-05-24)
Limits
Total Time: 45000 MS | Test Time: 1500 MS |Memory: 512 MB | Output: 64 MB | Size: 16 KB
Enabled languages
Available in

Description

Nerdson received the homework of the year, he has to take care of the school garden and, since his school is very large, the garden is too. The garden has a plant planted at each point with whole coordinates (x, y) such that (0<x<n, 0<y<n), incredibly in this place all the plants have the same height and the same shape. To make the work easier, he has designed a security system, but the budget is only enough for two cameras and he has placed them in the points (0, 0) and (0, n). It is known that a plant is completely monitored if it can be seen from the two chambers, that is to say in the line that connects each chamber with the plant there is no other plant. Nerdson realized that the system is not very good, since there are many plants that are not completely monitored, but this has helped him to consider a new problem of counting for his studies. Yesterday when he began to count he got bored fast (they are many) and decided to make a program that knowing the characteristics of the garden calculate the amount of plants completely guarded. You still have not succeeded, can you help him?
Nerdson recibió la tarea del año, tiene que cuidar el huerto escolar y, como su escuela es muy grande, el huerto también lo es. El huerto tiene una planta sembrada en cada punto con coordenadas enteras (x, y) tal que (0 < x < n, 0 < y < n), increiblemente en este lugar todas la plantas tienen la misma altura y la misma forma. Para hacer el trabajo más fácil ha disenado un sistema de seguridad, pero el presupuesto solo le alcanza para dos cámaras y las ha colocado en los puntos (0, 0) y (0, n). Se sabe que una planta esta completamente vigilada si se puede ver desde las dos cámaras, es decir en la línea que une cada cámara con la planta no existe otra planta. Nerdson se dio cuenta que el sistema no es muy bueno, ya que existem muchas plantas que no estan completamente vigiladas, pero esto le ha servido para plantearse un nuevo problema de conteo para sus estudios. Ayer cuando empezó a contar se aburrió rápido (son muchas) y decidió hacer un programa que conociendo las características del huerto calcule la cantidad de plantas completamente vigiladas. Todavia no lo ha logrado, puedes ayudarlo;jsessionid=D072A638DF7AEDE25114654AE4E02991?
Nerdson received the homework of the year, he has to take care of the school garden and, since his school is very large, the garden is too. The garden has a plant planted at each point with whole coordinates (x, y) such that (0<x<n, 0<y<n), incredibly in this place all the plants have the same height and the same shape. To make the work easier, he has designed a security system, but the budget is only enough for two cameras and he has placed them in the points (0, 0) and (0, n). It is known that a plant is completely monitored if it can be seen from the two chambers, that is to say in the line that connects each chamber with the plant there is no other plant. Nerdson realized that the system is not very good, since there are many plants that are not completely monitored, but this has helped him to consider a new problem of counting for his studies. Yesterday when he began to count he got bored fast (they are many) and decided to make a program that knowing the characteristics of the garden calculate the amount of plants completely guarded. You still have not succeeded, can you help him?

Input specification

A line with a number n (1 < n <= 500000).
Una línea con un número n (1 < n <= 500000).
A line with a number n (1 < n <= 500000).

Output specification

The amount of plants fully monitored.
La cantidad de plantas completamente vigiladas.
A line with a number n (1 < n <= 500000).

Sample input

2

Sample output

1

Hint(s)

http://coj.uci.cu/contest/
http://coj.uci.cu/contest/
http://coj.uci.cu/contest/