High School Programming League 2011/2012

Coins on the Matrix

Problem code: HS11CNSM

I am the proud owner of a beautiful, classic, electronic puzzle. It consists of a matrix with N rows and M columns filled with coins. Whenever I select a coin, it will change from heads to tails or vice versa. Moreover, all the coins in the cells of the puzzle that share a side with it will also change.

I spend entire hours trying to turn all the coins into heads but, after my success, my evil friend Rebeca starts playing and destroys my job.

In each move, she will select a coin at random. Can you tell me the expected number of heads in the matrix after K moves?

Input

Three space-separated integers N, M (1<=N,M<=10^6) and K (0<=K<=1000).

Output

The expected number of heads.

Example

Input:
2 1 1

Output:
0.000000

Example

Input:
2 2 1

Output:
1.000000

Note: The judge program ignores floating point rounding up to 10^-2.

Scoring

By solving this problem you score 10 points.


Added by:Yandry Perez
Date:2011-09-29
Time limit:5s
Source limit:50000B
Languages:All except: SED AWK
Resource:High School Programming League
SPOJ System © 2010 Sphere Research Labs. All Rights Reserved.