#include <iostream>
using namespace std;

int main() {

	string S;
	cin>>S;
	
	int flag=0;
	int count1=0;
	for(int i=0;i<S.length();i++)
	{
		if(S[i] !='0')
		{
			flag=1;
			break;
		}
		
		if(flag ==0)
		{
			count1++;
		}
	}
	
	flag=0;
	int count2=0;
	for(int i=S.length()-1;i>=0;i--)
	{
		if(S[i] !='0')
		{
			flag=1;
			break;
		}
		
		if(flag ==0)
		{
			count2++;
		}
	}
	
	if(count2 >= count1)
	{
		for(int i=0;i<count2-count1;i++)
		{
			S = '0'+S;
		}
		
		int flag2 =0;
		for(int i=0;i<S.length()/2;i++)
		{
			if(S[i] != S[S.length()-1-i])
			{
				flag2=1;
			}
		}
		
		if(flag2 == 1)
		{
			cout<<"No"<<endl;
		}
		else
		{
			cout<<"Yes"<<endl;
		}
		
	}
	else
	{
		cout<<"No"<<endl;
	}

	return 0;
}
#include <bits/stdc++.h>
using namespace std;
    
#define fi first
#define se second
#define pb push_back
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define FOR(i, a, b) for (int i = a; i <= (b); i++)
#define ROF(i, a, b) for (int i = a; i >= (b); i--)
#define y1 awefakhlrv

using pii = pair<int, int>; using vpii = vector<pii>;
using vi = vector<int>; using vvi = vector<vi>;
using ll = long long;
using pll = pair<ll, ll>; using vpll = vector<pll>;
using vll = vector<ll>; using vvll = vector<vll>;

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    ll n; cin >> n;
    int ans = 0;
    for (ll i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ll sz = n / i;
            if ((n * 2 / sz - sz + 1) % 2 == 0) {
                ll l = (n * 2 / sz - sz + 1) / 2;
                // cout << l << ' ' << l + sz - 1 << endl;
                ans += 2;
                // if ((n * 2 / sz - sz + 1) > 0) ans++;
            }
            if (n / i == i) break;
            sz = i;
            if ((n * 2 / sz - sz + 1) % 2 == 0) {
                ll l = (n * 2 / sz - sz + 1) / 2;
                // cout << l << ' ' << l + sz - 1 << ' ' << endl;
                ans += 2;
            }
        }
    }
    cout << ans << endl;
}