#C#, 165+31=210 bytes
The code requires the following usings:
using System;using System.Linq; Here the code:
class P{static void Main(string[]a){var b=ulong.Parse(Console.ReadLine());var c=b;int d=1;for(;c.ToString().Any(x=>x!='0'&&x!='1');d++){c+=b;}Console.WriteLine(d);}} Ungolfed:
using System; using System.Linq; class P { static void Main(string[] a) { var b = ulong.Parse(Console.ReadLine()); var c = b; int d = 1; for (; c.ToString().Any(x => x != '0' && x != '1'); d++) { c += b; } Console.WriteLine(d); } }