#include int main() { int l, w, h, a, b, c, total = 0; while (scanf("%dx%dx%d", &a, &b, &c) == 3) { l = a, w = b, h = c; if (l < w) w = l, l = b; if (w < h) { h = w, w = c; if (l < w) w = l, l = c; } total += l*w*2 + l*h*2 + w*h*3; } printf("%d\n", total); return 0; }