#include <stdio.h>

int main() {
    int a1, a2, a3;
    scanf("%d", &a1);
    scanf("%d", &a2);
    scanf("%d", &a3);
    int c1, c2, c3;
    c1 = a2*2 + a3*4;
    c2 = a1*2 + a3*2;
    c3 = a2*2 + a1*4;
    if(c1<=c2 && c1<=c3){
        printf("%d", c1);
    }
    else if(c2<=c1 && c2<=c3){
        printf("%d", c2);
    }
    else{
        printf("%d", c3);
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: