/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Scanner s
=new Scanner
(System.
in); int a[]={8,-7,2,7,0};
int n=a.length;
int sum=0;
int m=solve1(a,n-1,sum);
}
public static int solve1(int a[],int n,int sum){
if(n==0){
sum+=a[n];
return sum;
}
sum=sum+a[n];
return solve1(a,n-1,sum);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgcz1uZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWludCBhW109ezgsLTcsMiw3LDB9OwoJCWludCBuPWEubGVuZ3RoOwoJCWludCBzdW09MDsKCQlpbnQgbT1zb2x2ZTEoYSxuLTEsc3VtKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4obSk7CgkJCgl9CglwdWJsaWMgc3RhdGljIGludCBzb2x2ZTEoaW50IGFbXSxpbnQgbixpbnQgc3VtKXsKCQlpZihuPT0wKXsKCQkJc3VtKz1hW25dOwoJCQlyZXR1cm4gc3VtOwoJCX0KCQlzdW09c3VtK2Fbbl07CgkJcmV0dXJuIHNvbHZlMShhLG4tMSxzdW0pOwoKCX0gCgkKfQ==