# include <stdio.h>

int isPalindrome(char s[]){
	int len = 0;
	 // 1. まず文字列の長さを数える（ぬるもじ '\0' まで）
    	while(s[len] != '\0') {
        	len++;
		}

    // 2. 前（i）と後ろ（j）から挟み撃ちでチェック
    	int i = 0;
    	int j = len - 1; // 一番最後の文字の番号
    
    	while(i < j) {
        	if(s[i] != s[j]) {
            	return 0; // 一箇所でも違ったら回文じゃない
        	}
        	i++; // 前を一つ進める
        	j--; // 後ろを一つ戻す
    	}
    
    	return 1; // 最後まで一致したら回文！
	}
int main(){
    char s[100];
    scanf("%s",s);
    printf("%s -> %d\n",s,isPalindrome(s));
    return 0;
}
