class Sum{
public static void main(String[] args) {
System.out.println("Enter the number to know their
sum & Press 0 to get the Sum");
Scanner sc = new Scanner(System.in);
int s = 0;
int n;
do {
n = sc.nextInt();
s = s + n;
}while (n!=0);
System.out.println("Sum = " + s);
}
}