import java.util.Scanner;
public class Testadd {
public static void main(String[] args) {
int count=0;
int max = 0;
//创建Scanner对象
//System.in表示标准化输出,也就是键盘输出
Scanner sc = new Scanner(System.in);
//利用hasNextXXX()判断是否还有下一输入项
while (sc.hasNext()) {
//利用nextXXX()方法输出内容
int str = sc.nextInt();
if(str==0) {
break;
}
System.out.println(str);
count+=str;
max = max>str?max:str;
}
System.out.println("count:"+count+",max:"+max);
}
}