#include int main(){ int c, result; int value = 0; int vxod[999]; int a = 0; for(int i = 0; i < 4; i++){ c = scanf("%d",&value);; vxod[i] = c; a = i; } value = 0; results = vxod[0]; do{ result = results * vxod[value] + 1; value++; }while(value < a); printf("%d\n", result); return 0; }