#include<bits/stdc++.h>
using namespace std;
#define int long long
int num[10005]; //chua cac so
bool isNumber (string s)
{
for (int i = 0; i < s.size(); i++)
{
if (isdigit(s[i]) == false) return false;
}
return true;
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
string s;
getline(cin,s);
if (isNumber(s) == true)
{
int res = 0;
for (int i = 0; i < s.size(); i++)
{
res = res*10 + (s[i] - '0');
}
cout << res;
return 0;
}
int res = 0;
int k = 0;
for (int i = 0; i < s.size(); i++)
{
if (isdigit(s[i]) == true)
{
if (s[i - 1] == '-')
{
res = res*10 - (s[i] - '0');
}
else
{
res = res*10 + (s[i] - '0');
}
}
if (isdigit(s[i]) == false)
{
num[++k] = res;
res = 0;
}
}
int ans = 0;
for (int i = 1; i <= k; i++)
{
ans = max(ans, num[i]);
}
cout << ans;
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCiNkZWZpbmUgaW50IGxvbmcgbG9uZwoKaW50IG51bVsxMDAwNV07IC8vY2h1YSBjYWMgc28KCmJvb2wgaXNOdW1iZXIgKHN0cmluZyBzKQp7Cglmb3IgKGludCBpID0gMDsgaSA8IHMuc2l6ZSgpOyBpKyspCgl7CgkJaWYgKGlzZGlnaXQoc1tpXSkgPT0gZmFsc2UpIHJldHVybiBmYWxzZTsKCX0KCXJldHVybiB0cnVlOwp9CnNpZ25lZCBtYWluKCkKewogIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7CiAgY2luLnRpZSgwKTsKICBjb3V0LnRpZSgwKTsKICBzdHJpbmcgczsKICBnZXRsaW5lKGNpbixzKTsKICBpZiAoaXNOdW1iZXIocykgPT0gdHJ1ZSkKICB7CiAgCWludCByZXMgPSAwOwogIAlmb3IgKGludCBpID0gMDsgaSA8IHMuc2l6ZSgpOyBpKyspCiAgCXsKICAJCXJlcyA9IHJlcyoxMCArIChzW2ldIC0gJzAnKTsKCX0KCWNv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