import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
public static void main
(String[] args
) { Scanner scan
= new Scanner
(System.
in); int n = scan.nextInt();
int i = 0;
int j = 0;
int num[] = new int[10];
if (n == 0) {
num[0] = 0;
} else {
while (n > 0) {
num[j] = n % 10;
n /= 10;
j++;
}
j--;
}
int count = 0;
while (i <= j) {
if (num[i] == num[j]) count++;
i++;
j--;
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgkJU2Nhbm5lciBzY2FuID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQlpbnQgbiA9IHNjYW4ubmV4dEludCgpOwoJCWludCBpID0gMDsKCQlpbnQgaiA9IDA7CgkJaW50IG51bVtdID0gbmV3IGludFsxMF07CgkJaWYgKG4gPT0gMCkgewoJCQludW1bMF0gPSAwOwoJCX0gZWxzZSB7CgkJCXdoaWxlIChuID4gMCkgewoJCQkJbnVtW2pdID0gbiAlIDEwOwoJCQkJbiAvPSAxMDsKCQkJCWorKzsKCQkJfQoJCQlqLS07CgkJfQoJCWludCBjb3VudCA9IDA7CgkJd2hpbGUgKGkgPD0gaikgewoJCQlpZiAobnVtW2ldID09IG51bVtqXSkgY291bnQrKzsKCQkJaSsrOwoJCQlqLS07CgkJfQoJCVN5c3RlbS5vdXQucHJpbnQoY291bnQpOwoJfQp9