1. 
/**
* Angewandte Mathematik, SS11
* Problem: 424 - Integer Inquiry
* http://uva.onlinejudge.org/external/4/424.pdf
* @author Sebastian Stumpf
* @author Benjamin Vogt
* @version 1.0, 2011-04-12 17:19:00
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.136
*/

import java.io.*;
import java.math.*;


public class Main {
public static void main(String[] args)
{
try {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String s = input.readLine();
BigInteger sum = new BigInteger("0");
while(!(s.length() == 1 && s.charAt(0) == '0'))
{
BigInteger number = new BigInteger(s);
sum = sum.add(number);
s = input.readLine();
}
System.out.println(sum.toString());
} catch (IOException e) {e.printStackTrace();}
}
}

2.

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
*
* @author Stefan Haas
* @author Tran TuanAnh
* @version 1.0, 04/18/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.192
*/

import java.util.*;
import java.math.BigInteger;

public class Main {

public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String number = scan.nextLine();
BigInteger solution = new BigInteger("0");
while (!number.equals("0")) {
BigInteger b = new BigInteger(number);
solution = solution.add(b);
number = scan.nextLine();
b = new BigInteger(number);

}
System.out.println(solution);
}

}

3.

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Florian Stein
* @author Franz Sommer
* @version 1.0, 04/18/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.164
*/



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {




public static void main(String... args)
{ String line = "";

BigInteger bitmp = new BigInteger("0");
//Added real loop
try {BufferedReader reader = new BufferedReader(new
InputStreamReader(System.in));
while (true)
{
line = reader.readLine();
if(line=="0")
break;
BigInteger bi = new BigInteger(line);
bitmp = bitmp.add(bi);
}
}
catch (Exception e) { }
System.out.println(bitmp.toString());
}}

4.

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=365
* @author Brielbeck, Daniel
* @author Weber, Georg
* @version 1.0, 04/12/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.140
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {

public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
String input;
BigInteger output= new BigInteger("0");
while ((input = reader.readLine()) != null) {
if (input.equals("0")) break;
output=output.add(new BigInteger(input));
}
System.out.println(output);
}

}

5.

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

/**
* Angewandte Mathematik, SS11
* Problem: 424 - Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Pirmin Schneider
* @author Peter Weis
* @version 1.0, 04/05/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.208
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
BigInteger result = BigInteger.ZERO;
BigInteger next = BigInteger.ONE;

while (! next.equals(BigInteger.ZERO)) {
next = sc.nextBigInteger();
result = result.add(next);
}

System.out.println(result);
}

}

6.

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Weber Christian
* @author Waldleitner Christoph
* @author Wolff Marco
* @version 1.0, 04/12/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.200
*/

import java.math.BigInteger;
import java.util.Scanner;


public class IntegerInquiry
{

/**
* @param args
*/
public static void main(String[] args) throws Exception
{
Scanner scan = new Scanner(System.in);
String input = "";
BigInteger integ = new BigInteger("0");
while(scan.hasNext()){
input = scan.nextLine();

if(input.equals("0"))
{
break;
}
integ = integ.add(new BigInteger(input));
}
System.out.println(integ);
}
}


7.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Benedikt Z¨nnchen
* @author Erik Wenzel
* @version 1.0, 12/04/2011
*
* Method : BigInteger
* Status : Accepted
* Runtime: 0.128
*/

public class Main
{

public static void main(String[] args) throws IOException
{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line;
BigInteger sum = new BigInteger("0");

while((line = reader.readLine()) != null)
{
sum = sum.add(new BigInteger(line));
}
System.out.println(sum);
}

}


8.

/**
* Angewandte Mathematik, SS11
* Problem: 424 - Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Markus Schöllner
* @author Andreas Maier
* @version 1.0, 04/12/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.136
*/

import java.io.*;
import java.math.*;

public class Main {
public static void main(String[] args) throws IOException {

BufferedReader input = new BufferedReader(new InputStreamReader((System.in)));
BigInteger number;
BigInteger result=BigInteger.ZERO;
String inp = input.readLine();

while(inp.charAt(0) != '0'){
number = new BigInteger(inp);
result = result.add(number);
inp = input.readLine();
}
System.out.println(result);
}
}

9.

/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Unverzart Michael
* @author Wurth Manuel
* @version 1.0, 12/04/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.156
*/

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String inputLine="";
BigInteger ergebnis = BigInteger.ZERO;
while((inputLine = reader.readLine())!=null)
{
if(inputLine.equals("0"))break;
ergebnis=ergebnis.add(new BigInteger(inputLine));
}
System.out.println(ergebnis);
}
}

10.

/**
* Angewandte Mathematik, SS11
* Problem: 424 - Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Ritter Marius
* @author Wende Tom
* @author Zehentbauer Stefan
* @version 1.0, 04/18/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.196
*/

import java.math.BigInteger;
import java.util.Scanner;


public class Main {


public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
BigInteger bIntInput = scan.nextBigInteger();
BigInteger sum = BigInteger.ZERO;
do
{
sum = sum.add(bIntInput);
bIntInput = scan.nextBigInteger();
}while(!bIntInput.equals(BigInteger.ZERO));
System.out.println(sum);
}

}

11.


/**
* Angewandte Mathematik, SS11
* Problem: 424 Integer Inquiry
* Link: http://uva.onlinejudge.org/external/4/424.pdf
*
* @author Florian Stein
* @author Franz Sommer
* @version 1.0, 04/18/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.164
*/



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {




public static void main(String... args)
{ String line = "";

BigInteger bitmp = new BigInteger("0");
//Added real loop
try {BufferedReader reader = new BufferedReader(new
InputStreamReader(System.in));
while (true)
{
line = reader.readLine();
if(line=="0")
break;
BigInteger bi = new BigInteger(line);
bitmp = bitmp.add(bi);
}
}
catch (Exception e) { }
System.out.println(bitmp.toString());
}}