#include <iostream>
using namespace std;
int summ(int i, int n) // де (і, n) - низ та верх
{
if (n==i) return i;
else return i+summ(i+1,n);
}
int main() {
// your code goes here
cout<<summ(2,5);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKICAgIGludCBzdW1tKGludCBpLCBpbnQgbikgLy8g0LTQtSAo0ZYsIG4pIC0g0L3QuNC3INGC0LAg0LLQtdGA0YUKICAgIHsKCSAgICBpZiAobj09aSkgcmV0dXJuIGk7CgkgICAgZWxzZSByZXR1cm4gaStzdW1tKGkrMSxuKTsKICAgIH0KCmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJY291dDw8c3VtbSgyLDUpOwoJCglyZXR1cm4gMDsKfQ==