#include #define rep(i, n) for (int i = 0; i < (int) n; i++) #define repb(i, n) for (int i = (int) n; i >= 0; i--) #define reps(i, m, n) for (int i = (int) m; i < (int) n; i++) #define repsb(i, m, n) for (int i = (int) m; i >= (int) n; i--) #define SORT(v, n) sort(v, v + n); #define VSORT(v) sort(v.begin(), v.end()); # define pb(a) push_back(a) #define ll long long int int dy[] = { 0, 0, 1, -1, 0 }; int dx[] = { 1, -1, 0, 0, 0 }; template < class T > bool chmax(T & a,const T & b) { if (a < b) { a = b; return 1; } return 0; } template < class T > bool chmin(T & a,const T & b) { if (b < a) { a = b; return 1; } return 0; } //vector> vec(n_rows, vector(n_cols, value)); using namespace std; int main(int argc, char const * argv[]){ int d1,d2; cin>>d1>>d2; if(d1==d2||d1==2*d2)cout<<4<d2) cout<<8<