public static int ALL_ALCOHOL;
public static int LastCover;
public static int LastBottle;
public static void main(String[] args) {
problem(10);
System.out.println(ALL_ALCOHOL);
System.out.println(LastCover);
System.out.println(LastBottle);
}
public static void problem(int money){
int bay = money / 2;
ALL_ALCOHOL += bay;
int lid = LastCover + bay;
int bottle = LastBottle + bay;
int allMoney = 0;
if(lid >= 4){
allMoney += (lid / 4) * 2;
}
LastCover = lid % 4;
if(bottle >= 2){
allMoney += (bottle / 2) * 2;
}
LastBottle = bottle % 2;
if(allMoney >= 2){
problem(allMoney);
}
}
