import java.io.*;

public class Thread_bsp1 {
   private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
  }  // pause

  public static void main(String[] args) {
    myThread [] t;
    long summe=0;
    int i;
    t = new myThread[2];
      t[0]=new myThread(100,true);
      t[1]=new myThread(100,true);
    for (i=0; i<2;i++)  {
      t[i].start();
    }
    try {
      for (i=0; i<2;i++)  {
        t[i].join();
      }
    }
    catch (InterruptedException e) {
    }
    System.out.println(t[0].getSumme());
    pause();

  }

}
class myThread extends Thread {
  int _n;
  boolean _bOdd;
  long _summe;
  public myThread (int n, boolean bOdd) {
    _n = n;
    _bOdd = bOdd;
  } // create

  long getSumme()     {
    return _summe;
  }

  // Thread-Methode
  public void run() {
    _summe=0;
    long iStart;
    if (_bOdd)
      iStart = 1;
    else
      iStart=2;
    for (long i=iStart; i<=_n; i+=2) {
        _summe+=2*i+3;
        //System.out.println(_bOdd);
        try {
           Thread.sleep( 10 );
        } catch (InterruptedException e) {
        }
    }
  }


}  // myThread

