/** libraries */
#include
#include
#include
#include
#include
#include
#include
#include
/** libraries */
using namespace std;
/** defines */
#define ll long long
#define ld long double
#define yes cout << "YES" << "\n"</strong>
#define no cout << "NO" << "\n"</strong>
/** defines */
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
// problem 1 //
ll x;
cin >> x;
if(x > 0)
x *= 5;
else
x -= 10;
cout << x << "\n\n";</strong>
// problem 1 //
// problem 2 //
ll a[3];
for(ll i = 0; i < 3; i++)
cin >> a[i];
sort(a,a+3);
cout << a[0] + a[1] << "\n\n";</strong>
// problem 2 //
// problem 3 //
ll y;
cin >> y;
if(y > 0)
y++;
else
y -= 2;
cout << y << "\n\n";</strong>
// problem 3 //
// problem 4 //
ll b[3];
for(ll i = 0; i < 3; i++)
cin >> b[i];
sort(b,b+3);
cout << b[2] + b[1];</strong>
//problem 4 //
}