import java.util.*;
import java.lang.*;

public class uncowedforces{
	public static void main(String[]args){
		Scanner scanner = new Scanner(System.in);
		String inputm = scanner.nextLine();    // get the entire line after the prompt
		String[] m = inputm.split(" "); // split by spaces
		int[] intsm = new int[m.length];

		String inputw = scanner.nextLine();    // get the entire line after the prompt
		String[] w = inputw.split(" "); // split by spaces
		int[] intsw = new int[w.length];

		String inputh = scanner.nextLine();    // get the entire line after the prompt
		String[] h = inputh.split(" "); // split by spaces
		int[] intsh = new int[h.length];

		String[] x = "500,1000,1500,2000,2500".split(",");
		int[] scoresx = new int[x.length];

		for( int a = 0 ; a < m.length; a++){ //m
			if (intsm[a] >= 0 & intsm[a] <= 119){ //m
				for( int y = 0 ; y < w.length; y++){ //w
					if(intsw[y] >= 0 & intsw[y] <= 10){ //w
						for( int z = 0 ; z < h.length; z++){ //h
							if(intsh[z] >= 0 & intsh[z] <= 20){ //h
								//for( int x = 0 ; x < m.length; x++){

							}//end of if h
						}// end of for h
					}//end of if w
				}// end of for w
			}// end of if m
		}// end of for m

	}//end of main
}//end of class