not clear actually....
What's the purpose of adding up all the value from those elements if your question is to have a logical value that represents odd or not?
You may design a method that returns a logical value true/false with a parameter int value.....
Here is an example,
public static final boolean isOdd(int value){
return (value%2)>0;
}
Then, use that for testing those elements if the value is an odd or not....
If satisfied, do the operation....
You may use simplified operator "+="