Problem:
Score : 100 points

Problem Statement

We have a grid with H rows and W columns, where all the squares are initially white.

You will perform some number of painting operations on the grid.
In one operation, you can do one of the following two actions:

Choose one row, then paint all the squares in that row black.

Choose one column, then paint all the squares in that column black.

At least how many operations do you need in order to have N or more black squares in the grid?
It is guaranteed that, under the conditions in Constraints, having N or more black squares is always possible by performing some number of operations.

Constraints

1 \leq H \leq 100

1 \leq W \leq 100

1 \leq N \leq H \times W

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H
W
N

Output

Print the minimum number of operations needed.

Sample Input 1

3
7
10

Sample Output 1

2

You can have 14 black squares in the grid by performing the "row" operation twice, on different rows.

Sample Input 2

14
12
112

Sample Output 2

8

Sample Input 3

2
100
200

Sample Output 3

2

Solution in Java7 (OpenJDK 1.7.0) (judge verdict: Runtime Error)

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int len = sc.nextInt();
        MyData[] d = new MyData[len];

		for (int i = 0; i < len; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();
            d[i] = new MyData(a+b, a-b);
        }
		int ans = 0;
		int cur = -1000000000;
		for (int i = 0; i < len; i++) {
			if (d[i].getB() >= cur) {
				cur = d[i].getA();
				ans++;
            }
        }
		
//		for (int i = 0; i < len; i++) {
//			System.out.println(d[i].getB() + " " + d[i].getA());
  //      }
		System.out.println(ans);
    }
  
	public static class MyData implements Comparable<MyData> {
		int a, b;
		public MyData(int a, int b) {
			this.a = a;
            this.b = b;
        }
        public int compareTo(MyData other) {
            if (this.a == other.a) {
                return this.b - other.b;
            } else {
                return this.a - other.a;
            }
        }
        public int getA() {
            return this.a;
        }
        public int getB() {
            return this.b;
        }

    }
}