Problem:
Score : 100 points

Problem Statement

Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Constraints

2\leq K\leq 100

K is an integer.

Input

Input is given from Standard Input in the following format:

K

Output

Print the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive).

Sample Input 1

3

Sample Output 1

2

Two pairs can be chosen: (2,1) and (2,3).

Sample Input 2

6

Sample Output 2

9

Sample Input 3

11

Sample Output 3

30

Sample Input 4

50

Sample Output 4

625

Solution in PHP (5.6.30) (judge verdict: Accepted)

<?php
//error_reporting(0);
$K = trim(fgets(STDIN));
//list($x1,$y1,$x2,$y2) = explode(" ",trim(fgets(STDIN)));
//$A = explode(" ",trim(fgets(STDIN)));

$temps=kumiawase(range(1,$K),2);
$res=0;

foreach($temps as $v) {
  if ((($v[0] % 2)==0 && ($v[1] % 2) == 1)||
     (($v[1] % 2)==0 && ($v[0] % 2) == 1))
      $res++;
}
printf("%d\n",$res);

function kumiawase($zentai,$nukitorisu){
  $zentaisu=count($zentai);
  if($zentaisu<$nukitorisu){
    return;
  }elseif($nukitorisu==1){
    for($i=0;$i<$zentaisu;$i++){
      $arrs[$i]=array($zentai[$i]);
    }
  }elseif($nukitorisu>1){
    $j=0;
    for($i=0;$i<$zentaisu-$nukitorisu+1;$i++){
      $ts=kumiawase(array_slice($zentai,$i+1),$nukitorisu-1);
      foreach($ts as $t){
        array_unshift($t,$zentai[$i]);
        $arrs[$j]=$t;
        $j++;
      }
    }
  }
  return $arrs;
}