#![allow(non_snake_case)] use proconio::{marker::Chars, *}; // https://maguro.dev/blog/debug-macro/ #[allow(unused_macros)] macro_rules! debug { ($($a:expr),* $(,)*) => { #[cfg(debug_assertions)] eprintln!(concat!($("| ", stringify!($a), " = {:?} "),*, "|"), $(&$a),*); }; } fn main() { std::thread::Builder::new() .stack_size(256 * 1024 * 1024) .spawn(solve) .unwrap() .join() .unwrap(); } fn solve() { input! { s: Chars } let n = s.len(); let mut res = 0; for i in 0..n / 2 { res += (s[i] != s[n - i - 1]) as usize; } println!("{res}"); }