#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i, s) for (int i = 0; i < s; ++i) #define ALL(v) (v.begin(), v.end()) #define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl #define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i) template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } template ostream& operator << (ostream &s, pair P) { return s << '<' << P.first << ", " << P.second << '>'; } template ostream& operator << (ostream &s, vector P) { for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; } template ostream& operator << (ostream &s, vector > P) { for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; } template ostream& operator << (ostream &s, set P) { EACH(it, P) { s << "<" << *it << "> "; } return s << endl; } template ostream& operator << (ostream &s, map P) { EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; } typedef long long ll; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main() { ll a,b; cin>>a>>b; if(a>b) swap(a,b); if(a*2==b) cout<<3*a<