#include<iostream>
using namespace std;
class Boat;
class Car{
private:
int weight;
public:
Car(int j){
weight=j;
}
friend int getTotalWeight(Car&aCar,Boat&aBoat);
};
class Boat{
private:
int weight;
public:
Boat(int j){
weight=j;}
friend int getTotalWeight(Car&aCar,Boat&aBoat);
};
int getTotalWeight(Car&aCar,Boat&aBoat){
return aCar.weight+aBoat.weight;
}
int main(){
Car cl(4);
Boat bl(5);
cout<<getTotalWeight(cl,bl)<<endl;
return 0;
}