#include <iostream>#include <string>using namespace std;int main(){ string A; cin >> A; cout << (int)((A[0] - '0') + (A[(int)A.length() - 1] - '0')); return 0;}
C++
#include <iostream>
#include <string>
using namespace std;
int main()
{
string A;
cin >> A;
cout << (int)((A[0] - '0') + (A[(int)A.length() - 1] - '0'));
return 0;
}
C++