import java.util.Scanner;
/**
* 测试用例有10组,瓶子数控制在[1,100]
*/
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// System.out.println("enter:");
//循环输出10组测试用例
int count = 0;
while(count < 10) {
int bottleNum = scanner.nextInt();
//输入的瓶子数量在[1,100]之间
if (bottleNum >= 1 && bottleNum <= 100) {
int drinkNum = drink(bottleNum);
System.out.println("喝到的汽水数:" + drinkNum);
}
count++;
}
}
public static int drink(int x){
//输入0时,退出程序
if(x == 0)
return -1;
//瓶子数量小于3时,可以喝到的汽水为0
if(x < 3)
return 0;
//其它情况均为:空瓶数量/2
return x / 2;
}
}