#include <bits/stdc++.h> using namespace std; int main(){ string line; vector<int> firstRow; // 讀取第一行 getline(cin, line); // 使用正式的 for 循環解析數字 string currentNum=""; for(int i=0;i<line.length();i++){ char c=line[i]; if(c==' '){ if(!currentNum.empty()){ firstRow.push_back(stoi(currentNum)); currentNum=""; } } else { currentNum+=c; } } // 處理最後一個數字(如果有) if(!currentNum.empty()){ firstRow.push_back(stoi(currentNum)); } // 找出中間位置 int n=firstRow.size(); int middleIndex; if(n%2==1){ // 奇數個人,取正中間 middleIndex=n/2; } else { // 偶數個人,取中間偏右 middleIndex=n/2; } cout<<firstRow[middleIndex]<<endl; return 0; }