# data[].attributes.body
#include <bits/stdc++.h>
using namespace std ;
int giaithua(int x)
{
int i,giaithua=1;
for(i=1;i<=x;++i)

giaithua=giaithua*i;

return giaithua;
}
int main ()
{
long S,a,b,c,d,m,n ;
cin>>a>>b>>c>>d>>m>>n;
S = giaithua(a)+giaithua(b)+giaithua(c)+giaithua(d)+giaithua(m)+giaithua(n);
cout<<S;
return 0;

}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std;
long long s, a, b, c, d, n, m;
int gt(int k)
{
int gt = 1;
for (int i = 1; i <= k ; i++) gt*= i;
return gt;
}
int main()
{
cin >> a >> b >> c >> d >> n >> m;
s = gt(a) + gt(b) + gt(c) + gt(d) + gt(n) + gt(m);
cout << s;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int a,b;
cin>>a>>b;
int t = a ;
a=b ;
b=t;
cout<<a<<" "<<b;
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
int n,i,cuuchuong;
cin>>n;
cuuchuong=0;

for(int i = 1; i<=10 ; ++i )
{
cuuchuong=n*i;
cout<<cuuchuong<<" ";

}
return 0 ;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int m,n,k;
cin>>m>>n>>k;
if(k-n==n-m) cout<<2*m<<" "<<2*n<<" "<<2*k;
if( k-n != n-m) cout<<m-1<<" "<<n-1<<" "<<k-1;
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std;
bool nguyento(int n) {
if (n <= 1)
return false;
for (int i = 2; i <= sqrt(n); i++)
if (n%i == 0)
return false;
return true;
}
int main(){
int n;
cin >> n;
for(int i=2;i<=n;i++)
while (n%i == 0 && nguyento(i) ) {
cout << i << " ";
n /= i;
}
system("pause");
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
int a,b,c;
cin>>a>>b>>c;
if( a==b&&b==c) cout<<"day la tam giac deu";
if(( a==c)|(a==b) | (b==c) ) cout<<"day la tam giac can";
if(a!=b&&b!=c &&a!=c) cout<<"day la tam giac thuong";
return 0 ;

}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
int n,m,S,P ;
cin>>m>>n;
if(m>n) P=m-n;
else P=n-m;
S=m+n;
cout<<P<<" "<<S;
return 0 ;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
float a,b,c,d,mx,mn;
cin>>a>>b>>c>>d;
mx=a ;
if(b>mx) mx=b;
if(c>mx) mx=c;
if (d>mx) mx=d;
cout<<mx<<endl;
mn=a;
if(b<mn) mn=b;
if(c<mn) mn=c;
if (d<mn) mn=d;
cout<<mn;
return 0 ;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
int a,b,c;
cin>>a>>b>>c;
if((a*a==b*b+c*c)|(b*b==a*a+c*c) | (c*c==a*a+b*b ) ) cout<<"day la bo ba so Pytago";
else cout<<"day khong phai bo ba so pytago";
return 0;
}

# data[].attributes.body
#include<bits/stdc++.h>
using namespace std ;
int main ()
{
int n=4;
float tbc ;
float a[1114];
for (int i = 1 ; i <=n ; ++i)
{
cin>>a[i] ;

}
tbc=(a[1]+ a[2]+a[3]+a[4] )/n ;
cout<<tbc;
return 0 ;
}

# data[].attributes.body
#include <bits/stdc++.h>
using namespace std ;
int main ()
{
float a,b,c,d;
float  tbcong ;
cin>>a>>b>>c>>d;
tbcong= (a+b+c+d)/4;
cout<<tbcong;
return 0;
}