/************************************************
Grundlegende Algorithmen mit Java,
http://algorithmen-und-problemloesungen.de/
Copyright @2007-2008 by Doina Logofatu
************************************************/

import java.io.*;
import java.util.*;


public class P09QuadrateRek {
    private static final String FileInputName = "quadrateRek.in";
    private static final String FileOutputName = "quadrateRek.out";
    private int step = 0;
    private boolean inSquare(int x0, int y0, int cx, int cy, int k){
        int x1 = cx - k;
        int x2 = cx + k;
        int y1 = cy - k;
        int y2 = cy + k;
        return (x1 <= x0 && x0 <= x2 &&
                y1 <= y0 && y0 <= y2);
      }
    public void count(int x0, int y0, int cx, int cy, int k) {
        int x1, x2, y1, y2;
        if(inSquare(x0, y0, cx, cy, k)) this.step++;
        if(k>1){
          x1 = cx - k;
          x2 = cx + k;
          y1 = cy - k;
          y2 = cy + k;
          count(x0, y0, x1, y1, k/2);
          count(x0, y0, x1, y2, k/2);
          count(x0, y0, x2, y1, k/2);
          count(x0, y0, x2, y2, k/2);
        }
    }
    
    /**
     * @param args
     * @throws IOException 
     */
    public static void main(String[] args) throws IOException {
        Scanner sc = null;
        PrintStream out= null;
        try {            
            int k, x0, y0;
            out = new PrintStream(new File(FileOutputName));
            sc = new Scanner(new File(FileInputName ));
            while(sc.hasNextInt()) {
                k = sc.nextInt();                
                x0 = sc.nextInt();                
                y0 = sc.nextInt();
                P09QuadrateRek q = new P09QuadrateRek();
                q.count(x0, y0, 1024, 1024, k);
                out.println(q.step);                
            }
        }
        finally {
            if (sc!=null) {
                sc.close();
            }
            if(out!=null) {
                out.close();                
            }            
        }        
    }

}



