import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a = 0; String ans = ""; for(int i = 0; i < 5; i++) { a = in.nextInt(); if(a % 15 == 0) { ans += "FizzBuzz"; } else if(a % 3 == 0) { ans += "Fizz"; } else if(a % 5 == 0) { ans += "Buzz"; } else { ans += String.valueOf(a); } } System.out.println(ans.length()); } }