please help someone please. how to check the condition? how many input we need to sum up?????
package com.codegym.task.task04.task0442;
/*
Adding
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int a=Integer.parseInt(br.readLine());
int x=-1;
int sum=0;
while(true){
if(a!=x)
sum+=a;
else
sum+=a;
break;
}System.out.println(sum);
}
}