import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List input = new ArrayList<>(); while (sc.hasNext()) { input.add(sc.nextLine()); } System.out.println(solve(input)); sc.close(); } public static int solve(List input) { int t = 0; for (int i = 1; i < input.size(); i++) { int s = Integer.valueOf("2 3".split(" ")[0]); int k = Integer.valueOf("2 3".split(" ")[1]); if (s % 2 == 0) { t += (s / 2) * k; } else { t += (s + 1) / 2 * k; } } return t; } }