#include <iostream>
using namespace std;
int main()
{
int a,b,c;
int sum;
cin>>a>>b>>c;
if(a<0){
sum+=a;
}
if(b<0){
sum+=b;
}
if(c<0){
sum+=c;
}
cout<<sum;
return 0;
}
#include <iostream>
int main() {
int arr[5]{};
for(int& i : arr) {
std::cout << "Enter number: ";
std::cin >> i;
}
int sum{0};
for(int i : arr) sum += i < 0 ? i : 0;
std::cout << "Sum negative numbers in array is: " << sum;
return 0;
}