#include <iostream>
using namespace std;
int getSum(int x)
{
if(x==0)
return 0;
else
return x + getSum(x-1);
}
int main() {
// your code goes here
cout<<getSum(10);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKCiBpbnQgZ2V0U3VtKGludCB4KQogIHsKICAJaWYoeD09MCkKICAJIHJldHVybiAwOwogIAkgZWxzZQogIAkgIHJldHVybiB4ICsgZ2V0U3VtKHgtMSk7CiAgfQoKCmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJY291dDw8Z2V0U3VtKDEwKTsKCXJldHVybiAwOwp9