import java.util.Random;

public class Test {

  static class Obj {
    final Integer[] array;
    final int start;
    final int end;

    Integer max = Integer.MIN_VALUE;

    Obj(Integer[] array, int start, int end) {
      this.array = array;
      this.start = start;
      this.end = end;
    }

    Integer cmp(Integer i, Integer j) {
      return i > j ? i : j;
    }

    void calc() {
      int i = start;
      do {
        max = cmp(max, array[i]);
        i++;
      } while (i < end);
    }
  }

  static final int LEN = 2000;
  static final Integer[] a = new Integer[LEN];
  static {
    Random r = new Random(0x30052012);
    for (int i = 0; i < LEN; i++) {
      a[i] = new Integer(r.nextInt());
    }
  }

  public static void main (String[] args) {
    System.out.println("Start");
    Obj o = new Obj(a, 0, LEN);
    for (int i = 0; i < 1000; i++) {
      o.calc();
    }
    System.out.println(o.max);
  }
}
