//#define localsystem 1

#ifdef localsystem
#include"mytimer.h"

#define mytest 1

#ifdef mytest
#include<fstream>
#endif

#endif

#define min(x, y) ((x < y) ? x : y)
#define max(x, y) ((x > y) ? x : y)

#include<iostream>
#include<string>

using namespace std;

int main() {

#ifdef mytest
	ifstream mycin("Sample.txt");
	ofstream mycout("Test resutl.txt");
	if (!mycin.is_open() || !mycout.is_open()) {
		cout << "File can not be opened";
		return 0;
	}
	cin.rdbuf(mycin.rdbuf());
	cout.rdbuf(mycout.rdbuf());
#endif
#ifdef localsystem
	mytimer time_taken{};
#endif

int t{ 1 };
//cin >> t;

while (t--) {

	string s;
	cin >> s;
	int chc[26] = { 0 };
	char pc = '-';
	long long int ans{};

	for (int i = s.size() - 1; i >= 0; --i) {
		if (pc == s[i]) {
			ans += ((s.size() - i - 2) - chc[s[i] - 'a'] + 1);
			for (int k = 0; k < 26; ++k) chc[k] = 0;
			chc[s[i] - 'a'] = s.size() - i;
		}
		else chc[s[i] - 'a']++;
		pc = s[i];
	}
	cout << ans << "\n";
}

#ifdef localsystem
	time_taken.timetaken();
#endif
	return 0;
}
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    cin >> s;

    while (s.back() == '0')
    {
        s.pop_back();
    }

    string t = s;
    reverse(t.begin(), t.end());

    if (s == t)
        cout << "Yes\n";
    else
        cout << "No\n";
}
