public class Test {
public int getAgo(){
Scanner sc = new Scanner(System.in);
System.out.println("請輸入已買過的註數!");
int a = sc.nextInt();
return a ;
}
public int number(int a){
int num = 0;
while((a+num)*2>=5*num){
num++;
}
return num;
}
public static void main(String[] args){
Test t = new Test();
int a = t.getAgo();
System.out.println("下次需要買"+t.number(a)+"註不虧");
}
}