package yukicoder; import java.util.*; public class P637 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int[] a = new int[5]; int ans = 0; for(int i=0; i<5; i++) { a[i] = sc.nextInt(); if(a[i]%3==0&&a[i]%5==0) { ans += 8; } else if(a[i]%5==0 || a[i]%3==0) { ans += 4; } else { ans += Integer.toString(a[i]).length(); } } System.out.println(ans); } static int binarySearch(int[] A, int x) { int l = 0; int r = A.length; while(llb) { int mid = (lb+ub)/2; if(A[mid]>=b) ub = mid; else lb = mid+1; } return lb; } // union find lib // usage: // 最初にinitを呼ぶ // root: 直接は呼ばないで // unite: まとめる // same: グループ判定 static void init(int par[], int N) { for(int i=0; i=n-k+1; i--) { ans = (ans * i)%mod; } for(long i=k; 0