fork download
  1. import java.util.Scanner;
  2.  
  3. class B_Party {
  4. public static void main(String[] args) throws Exception{
  5. Scanner scan = new Scanner(System.in);
  6. for(int t = scan.nextInt(); t-->0;){
  7. System.out.println(Math.max(0, scan.nextInt()-2));
  8. }
  9. }
  10. }
Success #stdin #stdout 0.06s 213440KB
stdin
1
3
stdout
1