#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <cstdlib>
using namespace std;
class Student {
char name[20];
int stno, age, sc1, sc2, sc3, sc4;
float avgSc;
public:
void input() {
cin.getline(name, 20, ',');
cin >> age;
if (cin.get() == ',') {
cin >> stno;
}
if (cin.get() == ',') {
cin >> sc1;
}
if (cin.get() == ',') {
cin >> sc2;
}
if (cin.get() == ',') {
cin >> sc3;
}
if (cin.get() == ',') {
cin >> sc4;
}
}
void calculate() {
avgSc = (sc1 + sc2 + sc3 + sc4) / 4.0;
}
void output() {
cout << name << "," << age << "," << stno << "," << avgSc;
}
};
int main() {
Student student; // 定义类的对象
student.input(); // 输入数据
student.calculate(); // 计算平均成绩
student.output(); // 输出数据
}