#include <iostream>
#include <vector>
#include <sstream>
using namespace std;
vector<int> split_nums(string expr) {
vector<int> nums;
stringstream ss(expr);
string num;
while (getline(ss, num, ' ')) {
nums.push_back(atoi(num.c_str()));
}
return nums;
}
int main() {
string input;
cout << "Enter numbers separated by spaces: ";
getline(cin, input);
vector<int> numbers = split_nums(input);
int sum = 0;
cout << "Numbers: ";
for (int num : numbers) {
sum += num;
cout << num << ",";
}
cout << endl << sum << endl;
return 0;
}