#include"bits/stdc++.h" #include"atcoder/all" using namespace std; using namespace atcoder; #pragma GCC target("avx2") #pragma GCC optimize("O2") #pragma GCC optimize("unroll-loops") using ll = long long; using ld = long double; #define rep(i,m,n) for(ll i=(ll)m;i<(ll)n;i++) #define drep(i,m,n) for(ll i=m-1;i>=n;i--) #define Endl endl #define pr(i,j) make_pair(i,j) #define isin(x,l,r) (l<=x&&x> a >> b >> c >> d; cout << max(c * 3, a + b + c + d) << endl; }