#[><>](https://esolangs.org/wiki/Fish), <s>46</s> <s>43</s> 37 + 4 for ` -s=` = 41 bytes


    0&l?!v:3%?\&:n1+$o!
    f0.  >&n; >l&:@+n


This is an implementation of [xnor's algorithm](http://codegolf.stackexchange.com/a/92482/41881) in ><>.

It takes the input string on the stack (`-s` flag with the standard interpreter).

You can try it out on the [online interpreter](https://fishlanguage.com/playground).