#include <bits/stdc++.h>
using namespace std;
string ans[2] = {"NO", "YES"};
int main() {
  string s;
  cin >> s;
  while (!s.empty() && s.back() == '0') s.pop_back();
  cout << ans[s == string(s.rbegin(), s.rend())];
  return 0;
}
