#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin:
    a,b = map(int,line.split())
    print(len(str(a+b))) import sys sys for line in sys.stdin:
    a,b = map(int,line.split())
    print(len(str(a+b))) line sys.stdin sys stdin a,b = map(int,line.split()) a map(int,line.split()) map int line.split() line.split line split b print(len(str(a+b))) print len(str(a+b)) len str(a+b) str a+b a b b = map(int,line.split()) map(int,line.split()) b a,b = map(int,line.split()) map(int,line.split()) a
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin:
    a,b = map(int,line.split())
    print(len(str(a+b)))