#!/usr/bin/perl
$_=($ARGV[0]||"0")x($ARGV[1]||50);
while(s/(.+?)\1\1/($a=$1)=~tr!01!10!;$1.$1.$a/ge){}
print "$_\n"