import java.io.*;
import java.math.*;
import java.lang.*;
import java.util.*;

public class problem3 {
	public static void main(String[] args) throws IOException {
		int a;int b;int c;int d;int e;String f;
		
		File fil = new File ("OUT3.txt");
		FileWriter fw = new FileWriter (fil);
		
		File file = new File ("DATA3.txt");
		Scanner scanner = new Scanner (file);
		
		a = scanner.nextInt();
		f = scanner.nextLine();
		b = scanner.nextInt();
		f = scanner.nextLine();
		c = scanner.nextInt();
		f = scanner.nextLine();
		d = scanner.nextInt();
		f = scanner.nextLine();
		e = scanner.nextInt();
		f = scanner.nextLine();
		
		a = a/4;
		b = b/4;
		c = c/4;
		d = d/4;
		e = e/4;
		
		
		
		fw.write(a + "\r\n");
		fw.write(b + "\r\n");
		fw.write(c + "\r\n");
		fw.write(d + "\r\n");
		fw.write(e + "\r\n");
		fw.close();
	}
}
