Time limit per test
2 seconds
Memory limit per test
256 megabytes
Input
Standard Input
Output
Standard output
The hero of our story, Valera, and his best friend arcady are still in school, and therefore they spend all the free time playing turn-based strategy "Gaga: go and go again ". the gameplay is as follows.
There are two armies on the playing field each of which consistsNMen (NIs
Always even ). the current player specifies for each of her soldiers an enemy's soldier he will shoot (a target) and then all the player's soldiers shot simultaneously. this is a game world, and so each soldier shoots perfectly, that is he absolutely always
Hits the specified target. If an enemy soldier is hit, he will surely die. It may happen that several soldiers had been indicated the same target. killed soldiers do not particle in the game anymore.
The game "Gaga" consists of three steps: first Valera makes a move, then arcady, then Valera again and the game ends.
You are asked to calculate the maximum total number of soldiers that may be killed during the game.
Input
The input data consist of a single integerN(2 cores ≤ CoresNLimit ≤ limit 108,NIs
Even). Please note that before the game starts there are 2NSoldiers on the fields.
Output
Print a single number-a maximum total number of soldiers that cocould be killed in the course of the game in three turns.
Sample test (s) Input
2
Output
3
Input
4
Output
6
Note
The first sample test:
1) Valera's soldiers 1 and 2 shoot at arcady's Soldier 1.
2) arcady's Soldier 2 shoots at Valera's Soldier 1.
3) Valera's Soldier 1 shoots at arcady's Soldier 2.
There are 3 soldiers killed in total: Valera's Soldier 1 and arcady's soldiers 1 and 2.
Problem-solving Description: The question shows that there must be three times of shooting. the maximum number of dead soldiers is required. One of them must be all killed, at least N. The worst case is that the other is half killed, 3/2 N in total
#include<stdio.h>int main(){int n,result;scanf("%d",&n);result=(n/2)*3;printf("%d",result);return 0;}