import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		float arr1[] = new float[5];
		float arr2[] = new float[5];
		float sum1,sum2,sum;
		int x, y,max=0,fix=500;
		Scanner s = new Scanner(System.in);
		for (int i = 0; i < 5; i++)
			arr1[i] = s.nextFloat();
		for (int i = 0; i < 5; i++)
			arr2[i] = s.nextFloat();
		x = s.nextInt();
		y = s.nextInt();
		for (int i = 0; i < 5; i++) {

			max+=((1-(arr1[i]/250))*fix)-(50*arr2[i]);
			fix+=500;
		}
		sum1=100*x;
		System.out.println(sum1);
		sum2=50*y;
		System.out.println(sum2);
		sum=max+sum1+sum2;
		System.out.print(sum);

	}

}
